67 152
Assignments Done
99,4%
Successfully Done
In November 2018

Answer to Question #15276 in C++ for Bill Jovan

Question #15276
write a program that ask a user to enter a number n and display the first n even number
Expert's answer
#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!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions