76 337
Assignments Done
Successfully Done
In May 2019

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;

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!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions