I created a program for printing number from 0 to 10. The program is given below.
Code:
#include<Stdio.h>
void main()
{
int i=0;
for(i=0;i<=10;i++)
{
printf("%d",i);
printf("\n");
printf("\t");
}
}
Im getting output :
0
1
2
3
4
5
6
7
8
9
10
But after some modification to program (placing printf("\t"); above printf("%d",i); )
The new program
Code:
#include<Stdio.h>
void main()
{
int i=0;
for(i=0;i<=10;i++)
{
printf("\t");
printf("%d",i);
printf("\n");
}
}
0
1
2
3
4
5
6
7
8
9
10
Please help. why in first program 0 is not getting the vertical tab but all other numbers after 0 got vetical tab and in second program all numbers got vertical tab.
Thank you..