how to print 1 to 20 | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

how to print 1 to 20

how to print 1 to 20 using while loop in c program?

28th Mar 2018, 6:00 PM
Jordan
Jordan  - avatar
1 Réponse
+ 2
int x = 1; while (x <= 20) { printf("%d", x); x++; } (Obviously add the main function and include the io library)
28th Mar 2018, 6:06 PM
TurtleShell
TurtleShell - avatar