Math, asked by shreyasipal63, 1 year ago

What is the code (in python) to print all the natural numbers ending with 2 between 1 to 99?

Answers

Answered by aloneforever18
0

Hello

Using goto statement: #include <stdio.h> int main() { int i = 0; begin: i = i + 1; printf ( "%d " , i); if (i < 100) goto begin; return 0; } chevron_right. ...

Using recursive main function: #include <stdio.h> int main() { static int i = 1; if (i <= 100) { printf ( "%d " , i++); main(); } return 0; } chevron_right. Output:

Similar questions