Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Code in C++ Problem-3 (6 points): Write a complete CH+ program that prompts the user to enter an integer number and reads that number from

Code in C++
image text in transcribed
Problem-3 (6 points): Write a complete CH+ program that prompts the user to enter an integer number and reads that number from the keyboard. - If the entered number is negative, your program should print the following message: "The program doesn't accept negative numbers" and stop the execution. - If the entered number is positive and less or equal 100 (between 0 to 100), the program should check and display whether the number is divisible by 4 or not. Also, your program must display quotient and remainder. - If the entered number is greater than 100 , your program should print square root of the given number. Here is a sample run: 1) Enter an integer number to see if the given number is divisible by 4 or not: 16 The program does not accept negative numbers 2) Enter an integer number to see if the given number is divisible by 4 or not: 16 The given number (16) is divisible by 4 Quotient: 4 and Remainder: 3) Enter an integer number to see if the given number is divisible by 4 or not: 15 The given number (15) is not divisible by 4 Quotient: 3 and Remainder: 3 4) Enter an integer number to see if the given number is divisible by 4 or not: 121 The entered number is greater than 100 and square root of the number is 11

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

Advanced Oracle Solaris 11 System Administration

Authors: Bill Calkins

1st Edition

0133007170, 9780133007176

More Books

Students also viewed these Databases questions

Question

Ability to work comfortably in a team environment

Answered: 1 week ago

Question

Exposure to SQL desirable but not required

Answered: 1 week ago