PROGRAM TO DISPLAY FIVE NUMBERS ON EACH LINE | C Program to create rectangle of numbers | 5 numbers in each line printing 1 to 100 numbers
#include
main()
{
int i,c=0;
clrscr();
for (i=1;i<100;i++)
{
printf("%4d",i);
c++;
if(c%5==0)
printf("\n");
}
getch();
}
No comments:
Post a Comment