+ 1

[ASSIGNMENT] Write the program in c++ to find the odd no. b/w 1 to 100

7th Apr 2018, 12:27 PM
maya
5 Answers
18th Apr 2018, 8:04 AM
Aman Soni
Aman Soni - avatar
+ 7
for(int a=0;a<=100;a++){ if (a%2==0){ continue; } cout<<a; }
7th Apr 2018, 1:26 PM
Muhd Khairul Amirin
Muhd Khairul Amirin - avatar
+ 5
for (int i=1; i<=100; std::cout<<i<<" ", i+=2);
7th Apr 2018, 12:47 PM
Hatsy Rei
Hatsy Rei - avatar
+ 3
for(int i = 1; i <= 100; i++) { if(i%2!=0) cout >> i; }
7th Apr 2018, 12:35 PM
Aaron Stone
Aaron Stone - avatar
0
//using a while loop int b=1; while (b<100){ b++; if (b%2==0){ continue; } cout<<b<<endl; }
13th May 2018, 2:17 PM
Benard Omondi
Benard Omondi - avatar