Question: WHAT EXACTLY IS THIS ASKING ME TO WRITE PLEASE WRITE CODE ============== Please complete the following program. You can either submit a source file or

WHAT EXACTLY IS THIS ASKING ME TO WRITE

PLEASE WRITE CODE

==============

Please complete the following program. You can either submit a source file or cut and paste your code into the Text Submission area.

You have 15 minutes to complete your code. Your code will not be graded, you will get 1 point for submitting the lab exercise. So, just do your best.

Use (number%2==0) to check if the number is even or odd.

==============

#include

using std::cout;

using std::cin;

int main() {

int number;

std::cout << "Give me an integer: ";

//1. input an integer and assign it to number.

// your code here

//2.1. calculate if the entered number is an even number or an odd number. The modulus operator "%" will give you the remainder of a division, for example, 9%2 results 1, and 8%2 gives 0. The remainder 1 indicates the number is an odd number, remainder 0 indicates the number is an even number.

//2.2. if the number is even, print "The number is a multiple of 2." Otherwise, print "The number can not be divided into two equal groups."

// your code here

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!