Control and looping
Question ID
1114210080 : SQUARE STAR PATTERN
Logic Test case 1
Input (stdin)
2
expected Output
**
**
Logic Test case 2
Input (stdin)
4
Expected Output
****
****
****
****
code area :
#include <stdio.h>
int main()
{
int row,num,l;
scanf("%d",&num);
for(row=1;row<=num;row++)
{
for(l=1;l<=num;l++)
{
printf("*");
}
printf("\n");
}
return 0;
}
No comments:
Post a Comment