The Above program will terminate when the value of 'i' becomes 6 and will display incomplete output....
I have corrected the Program and it is below..... #include #include void main() { int i,j=10; clrscr(); for(i=1;i<=10;i++,j--) { printf("%d, %d ", i,j); } getch(); }
2 comments:
The Above program will terminate when the value of 'i' becomes 6 and will display incomplete output....
I have corrected the Program and it is below.....
#include
#include
void main()
{
int i,j=10;
clrscr();
for(i=1;i<=10;i++,j--)
{
printf("%d, %d ", i,j);
}
getch();
}
I will I<=5;I<=10 is incorrect
Post a Comment