Question: 1- Write the code to test a variable x to see if it is divisible by 3, or by 7, or by 11. Print a

1- Write the code to test a variable x to see if it is divisible by 3, or by 7, or by 11. Print a specific message Number is divisible by X if it is divisible by X. There is no need to check divisibility by a combination of 2 or 3 numbers. For example, if x is 21, print x is divisible by 3 and also print x is divisible by 7 in a separate statement. (4 pts):

2- Use a conditional operator to fill in the underlined part of the "cout" statement to make the following code prints either is greater than 10 or less than or equal to 10 depending on value of the number. Put your entire code only inside the parentheses and do not modify other part of the code. (3 pts):

int i;

cout << "Enter a number:";

cin >> i;

cout << "Number " << i <<

(........................................................................................) ;

Type or paste question 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!