Answer to Question #31186 in C++ for Aziz Ahmed Chowdhury

Question #31186
find the odd numbers from n1 to n2
1
Expert's answer
2013-05-28T07:20:19-0400
#include <iostream>

int main()
{
int n1, n2;
std::cout <<"enter n1\n";
std::cin >>n1;
std::cout <<"enter n2\n";
std::cin >>n2;
for( int i=n1+1; i<n2; ++i )
{
if( (i%2)==1 )
{
std::cout <<i <<std::endl;
}
}
return 0;
& }

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS