0
IS POSSIBLE TO PRINT 1 TO 100 WITHOUT FOR LOOP
IN C LANGUAGE NOT USE FOR WHILE
3 odpowiedzi
+ 1
and you can just unroll the loop e.g. type out 100 print statements
0
PARTH CHAUHAN
Yes, you can via following ways:
1> Using recursion
2> Using while/do while loop
3> Using goto
3rd point example:
```
int n = 1;
start:
if (n <= 100) {
printf("%d\n", n);
n++;
goto start;
}
```
0
#include <stdio.h>
int main() {
int i = 1;
do { printf("%d\n", i++); } while(i<=100);
}