Description

Let's Start the code.....

1. Star Square Pattern

#include<stdio.h>
int main(){
    int n;
    printf("Enter the size of pattern : ");
    scanf("%d", &n);
    for(int i=1 ;i<=n; i++){
        for(int j=1; j<=n;j++){
            printf("*");
        }
        printf("\n");
    }
    return 0;
}

Output :

star square pattern in c programming

2. Numeric Square pattern (1)

#include<stdio.h>
int main(){
    int n;
    printf("\nEnter the size of pattern : ");
    scanf("%d", &n);
    for(int i=1 ;i<=n; i++){
        for(int j=1; j<=n;j++){
            printf("%d ", i);
        }
        printf("\n");
    }
    return 0;
}

Output :

Numeric square pattern in c programming

3. Numeric square pattern (2)

#include<stdio.h>
int main(){
    int n;
    printf("\nEnter the size of pattern : ");
    scanf("%d", &n);
    for(int i=1 ;i<=n; i++){
        for(int j=1; j<=n;j++){
            printf("%d ", j);
        }
        printf("\n");
    }
    return 0;
}

Output :

Numeric square pattern in c program4. Numeric Square Pattern (3)

#include<stdio.h>
int main(){
    int n;
    printf("\nEnter the size of pattern : ");
    scanf("%d", &n);
    for(int i=n ;i>=1; i--){
        for(int j=1; j<=n;j++){
            printf("%d ", i);
        }
        printf("\n");
    }
    return 0;
}

Output :

Numeric Square reverse pattern in c programming

5. Numeric Square pattern (4)

#include<stdio.h>
int main(){
    int n;
    printf("\nEnter the size of pattern : ");
    scanf("%d", &n);
    for(int i=n ;i>=1; i--){
        for(int j=5; j>=1;j--){
            printf("%d ", j);
        }
        printf("\n");
    }
    return 0;
}

Output :

Numeric Sqaure pattern c program

6. Numeric Square pattern (5)

#include<stdio.h>

int main(){
    int n;
    printf("Enter the size of patten : ");
    scanf("%d", &n);
    int k=1;
    for(int i=1; i<=n; i++){
        for(int j=1; j<=n; j++){
            printf("%2d ", k);
            k++;
        }
        printf("\n");
    }
    return 0;
}

Output :

C program numeric square pattern

7. Numeric Square pattern (6)

#include<stdio.h>

int main(){
    int n;
    printf("\nEnter the size of patten : ");
    scanf("%d", &n);
    int k=1;
    for(int i=1; i<=n; i++){
        for(int j=1; j<=n; j++){
            printf("%2d ", k);
            k = k+2;
        }
        printf("\n");
    }
    return 0;
}

Output :

Numeric square pattern 6 in c programming

8. Numeric Square pattern (7)

#include<stdio.h>

int main(){
    int n;
    printf("\nEnter the size of patten : ");
    scanf("%d", &n);
    int k=2;
    for(int i=1; i<=n; i++){
        for(int j=1; j<=n; j++){
            printf("%2d ", k);
            k = k+2;
        }
        printf("\n");
    }
    return 0;
}

Output :

Numeric Square pattern in c

9. Numeric Square Pattern (8)

#include<stdio.h>

int main(){
    int n;
    printf("\nEnter the size of patten : ");
    scanf("%d", &n);
    
    for(int i=1; i<=n; i++){
        for(int j=1; j<=n; j++){
            printf("%2d ", i*j);
        }
        printf("\n");
    }
    return 0;
}

Output :

Numeric Pattern square


10. Numeric Square Pattern (9)

#include<stdio.h>

int main(){
    int n;
    printf("\nEnter the size of patten : ");
    scanf("%d", &n);
    
    for(int i=1; i<=n; i++){
        for(int j=1; j<=(n-2); j++){
            printf("%d %d ", j, i);
        }
        printf("\n");
    }
    return 0;
}

Output :

pattern square numeric in c programming

Comments

Login is mandatory to comment Please login

 Akash Kumar

Comment : Nice Post!! ❤️❤️