Answer to Question #20273 in C++ for sidra ahsaan
between any two integers ,find all the numbers divisible by 5 and 10.
1
2012-12-07T05:00:13-0500
#include <iostream>
using namespace std;
void main()
{
intlow, high;
cout<< "Enter low range: ";
cin>> low;
cout<< "Enter high range: ";
cin>> high;
cout<< "
Divisible by 5:";
for(int i = low; i <= high; i++)
{
if(i % 5 == 0)
{
cout<< " " << i;
}
}
cout<< "
Divisible by 10:";
for(int i = low; i <= high; i++)
{
if(i % 10 == 0)
{
cout<< " " << i;
}
}
cout<< endl;
}
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!
Learn more about our help with Assignments:
C++
Comments
Leave a comment