/* 1. Program to print the following output.
#include <stdio.h>
int main()
{
int i, j;
//Used to iterate over each row
for(i=1; i<=5; i++)
{
//Used to print columns of each row
for(j=1; j<=5; j++)
{
printf("*");
}
//Moves to the next line/row
printf("\n");
}
return 0;
}
/* 2. Program to print the following output.
#include <stdio.h>
int main()
{
int i, j;
//Used to iterate over each row
for(i=1; i<=5; i++)
{
//Used to iterate over columns of each rows
for(j=1; j<=20; j++)
{
printf("*");
}
//Move to the next line/row
printf("\n");
}
return 0;
}
*****
*****
*****
*****
*****
*/
int main()
{
int i, j;
//Used to iterate over each row
for(i=1; i<=5; i++)
{
//Used to print columns of each row
for(j=1; j<=5; j++)
{
printf("*");
}
//Moves to the next line/row
printf("\n");
}
return 0;
}
/* 2. Program to print the following output.
********************
********************
********************
********************
********************
*/
int main()
{
int i, j;
//Used to iterate over each row
for(i=1; i<=5; i++)
{
//Used to iterate over columns of each rows
for(j=1; j<=20; j++)
{
printf("*");
}
//Move to the next line/row
printf("\n");
}
return 0;
}