Question #265195

Write a program that reads 10 integers from user and then finds and prints all the Odd numbers that are divisible by 5.


Expert's answer

#include <iostream>


using namespace std;


int main()
{
    int n[10],i;
    cout<<"Enter 10 integers: "<<endl;
    for(i=0;i<10;i++)
    {
        cin>>n[i];
    }
    cout<<"The Odd numbers that are divisible by 5."<<endl;
    for(i=1;i<10;i++)
    {
        if(n[i]%5==0)
        {
            cout<<n[i]<<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!

LATEST TUTORIALS
APPROVED BY CLIENTS