Answer to Question #265195 in C++ for DANISH

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.


1
Expert's answer
2021-11-12T17:30:13-0500
#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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS