- 1

Write a program to display sum of odd numbers

please

16th Dec 2016, 2:11 PM
Shakirr Khan
Shakirr Khan - avatar
4 ответов
+ 11
int sum =0; for(int i=0;i<100;i++){ if(i%2!=0) sum+=i; }
16th Dec 2016, 4:11 PM
Remmae
Remmae - avatar
+ 1
Maybe it works: for(x=1; x < 100; x+=2) { System.out.print(x); }
16th Dec 2016, 2:46 PM
Silas Junior
Silas Junior - avatar
0
Write a program to display sum of 10 odd numbers using only for loop
17th Dec 2016, 2:15 PM
Shakirr Khan
Shakirr Khan - avatar
0
wap to print pattern * ** *** ****
20th Dec 2016, 3:00 PM
Shakirr Khan
Shakirr Khan - avatar