Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Why We Form Relationships Managing Relationship Dynamics?

Answered: 1 week ago