Answer to Question #15276 in C++ for Bill Jovan
write a program that ask a user to enter a number n and display the first n even number
1
2012-09-25T11:33:29-0400
#include <iostream>
using namespace std;
int main (){
int n;
cout<<"Enter number n please!\n";
cin>> n ;
if (n%2 == 0) cout<< "It's even number" << ' ' << n <<endl;
else cout<< "It's not even number" << ' ' << n <<endl;
system("pause");
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!
Learn more about our help with Assignments:
C++
Comments
Leave a comment