write a c++ program to find odd numbers in range.
Source code-
#include<iostream>
using namespace std;
int main(){
int min,max,num;
cout<<"Enter minimum range ";
cin>>min;
cout<<"Enter maximum range ";
cin>>max;
for(num=min;num<=max;num++)
if(num%2!=0)
cout<<num<<"\t";
}
OUTPUT-
Enter minimum range 1
Enter maximum range 10
1 3 5 7 9
Comments
Post a Comment