+ 1
If the question is: print all the odd numbers between 21-50 using for loop...then how will be the format
5 Answers
+ 3
if u cannot convert while loop to for loop.. then please first learn them properly. and make sure that u try of your own first..
well here's it in for loop..
int i;
for(i=21; i<=50; i++){
if(i%2!=0){
cout<<i<<endl;
}
}
+ 1
int i=21;
while(i>=21 && i<=50){
if(i%2!=0){
cout<<i<<endl;
}
i++;
}
0
I said using for loop
0
well I learned" for" loop first I didn't yet started with while loop...n yes thanks.