Computer Science, asked by bijaivir, 1 year ago

write a program to print the series 1,3,5,7,9


SwapnilRao: c++
SwapnilRao: ??

Answers

Answered by praveenmorupu
8

11,13 because it is odd numbers



saty89: for(int i=1;i<=9;i+2) { cout<
saty89: just type the for loop and change i++ to i+2 which will print 1,3,5,7,9
Answered by Anonymous
8

#include <iostream>

#include <conio.h>  //Header files to include the libraries

using namespace std;

int main()

{    int i;

   for (i=1; i<=9; i+=2)  //Loop that starts with 1 and goes upto 9.

   cout<<i;                  //Odd no.s are printed

   return 0;

}

Similar questions