Best writers. Best papers. Let professionals take care of your academic papers

Order a similar paper and get 15% discount on your first order with us
Use the following coupon "FIRST15"
ORDER NOW

Question Question This problem continues to give me this error. /> ==================== YOUR OUTPUT ===================== 0001: Enter~a~number:~11~is~Odd =================== MISMATCH FOUND ON LINE 0001: =================== ACTUAL : Enter~a~number:~11~is~Odd EXPECTED: Enter~a~number:~11 ====================================================== My coding is below. I don’t understand what I’m missing. #include #include using namespace std; string evenOrOdd(int number) { string answer; if ((number % 2) == 0) { answer = “Even”; } else { answer = “Odd”; } return answer; } int main() { string answer; int number = 1; while (number != 0) { cout<>number; cout<<number; if (number != 0) { answer = evenOrOdd(number); cout<<" is " << answer < ==================== YOUR OUTPUT ===================== 0001: Enter~a~number:~11~is~Odd =================== MISMATCH FOUND ON LINE 0001: =================== ACTUAL : Enter~a~number:~11~is~Odd EXPECTED: Enter~a~number:~11 ====================================================== My coding is below. I don’t understand what I’m missing. #include #include using namespace std; string evenOrOdd(int number) { string answer; if ((number % 2) == 0) { answer = “Even”; } else { answer = “Odd”; } return answer; } int main() { string answer; int number = 1; while (number != 0) { cout<>number; cout<<number; if (number != 0) { answer = evenOrOdd(number); cout<<" is " << answer << endl; } } return 0;

Question

This problem continues to give me this error. />==================== YOUR OUTPUT =====================                    0001: Enter~a~number:~11~is~Odd                                                                                                                                                                                               =================== MISMATCH FOUND ON LINE 0001: ===================      ACTUAL  : Enter~a~number:~11~is~Odd                                       EXPECTED: Enter~a~number:~11                                              ====================================================== 
My coding is below. I don’t understand what I’m missing.
#include <iostream>#include <string>using namespace std;string evenOrOdd(int number) {string answer;if ((number % 2) == 0) {answer = “Even”;}else {answer = “Odd”;}return answer;}int main() {string answer;int number = 1;while (number != 0) {cout<<“Enter a number: “;cin>>number;
cout<<number;if (number != 0) {answer = evenOrOdd(number);cout<<” is ” << answer << endl;}}return 0;

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"