- 1
[ASSIGNMENT] find odd numbers 1 to 30 using for loop
what is code of that in c program
5 Answers
+ 3
for (int i = 1; i <= 30; i++) {
if (i % 2 != 0) {
printf("%d", i);
}
}
Put your own code inside the if statement if you want to do something different with the odd number
+ 3
Jordan you literally just posted this same question except that you asked 1 to 20.......
https://www.sololearn.com/Discuss/1175754/how-to-print-1-to-20
+ 1
@Ole113 Yeah I realised that too but it doesnât really matter
0
@Ole113 I realised it was the same guy before I wrote my post
- 1
@TurtleShell how did you just realize that....