fill in the comments and condition: (i am trying to run the programbut all i get
ID: 3618708 • Letter: F
Question
fill in the comments and condition: (i am trying to run the programbut all i get is error) ::sigh::#include <iostream>
#include <istream>
#include <istream>
//read integers and print a message that tells
//the user if the number is even or odd
int main() //
{
int x; // _______comment goes here________
while (std::cin >> x) // _____comment goes here______
if (__condition goes here___) // ____comment goes here____
std::cout<<x<<" is even. "; // ____comment goeshere_____
else
std::cout << x << " is odd. "; // ___comment goeshere___
return 0; // ___comment here____
}
I must be putting in the wrong comments and condition; because allI keep getting is error error error
Explanation / Answer
please rate - thanks #include //read integers and print a message that tells //the user if the number is even or odd int main() // { int x; // declare variable while (std::cin >> x) // keep inputting values until thereare no more(CTRL^Z entered if (x%2==0) // if it's evenly divisible by 2 it's even std::coutRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.