Loop is a very important topic on c programming. It is said that if one does not understand loop clearly then he must not understand the next topics on c. So try to understand the loop hardly.
input:
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a = 1;
start:
printf("%d",a);
a++;
if (a<=7)
goto start;
return 0;
}
Output :
1234567
input:
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a = 1;
start:
printf("%d",a);
a++;
if (a<=7)
goto start;
return 0;
}
Output :
1234567
No comments:
Post a Comment