In: Computer Science
C++ CODE TO FIND ALL Odd numbers between 1 and 70000.
#include <iostream>
using namespace std;
int main()
{
int i;
for(i=1;i<=70000;i++)
{
if(i%2!=0)
{
cout<<" "<<i;
}
}
return 0;
}
Screenshot of code
OUTPUT