Create a program will ask the user to enter an integer number and a string . If the integers number is odd print the string word/s that the user enter and if the integers number is even print the even number with the string word s “this is an even number”.
1
Expert's answer
2021-10-28T07:56:12-0400
#include <iostream>using namespace std;
int main() {
int a;
string str;
cin >> a;
cin >> str;
if (a%1 != 0) {
cout << str;
}
else {
cout << "this is an even number" << endl;
}
return0;
}
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments