Any no of square/rect using stars

 #include <stdio.h>


int main()

{

    int rows , columns ;

    printf("enter number of rows : ");

    scanf("%d", &rows);

    printf("enter number of columns : ");

    scanf("%d", &columns);

    for (int i = 0 ; i<rows ; i++){

        for (int j=0 ; j<columns ; j++){

            printf("*");

        }

        printf("\n");

        

    } 

    return 0;

}

Comments

Popular posts from this blog

Sum of Even Numbers till N

Find the Runner-Up Score!

Print All Substrings