Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2- What the Output of the following code in case the user Enter 1.2 #include using namespace std; int main() { double radius, circumference, area;

2- What the Output of the following code in case the user Enter 1.2

#include using namespace std; int main() { double radius, circumference, area; // Declare 3 floating-point variables const double PI = 3.14159265; // Declare and define PI cout << "Enter the radius: "; // Prompting message cin >> radius; // Read input into variable radius // Compute area and circumference area = radius * radius * PI; circumference = 2.0 * radius * PI; // Print the results cout << "The radius is: " << radius << endl; cout << "The area is: " << area << endl; cout << "The circumference is: " << circumference << endl; return 0; }

3- Write a program which inputs a temperature reading expressed in Fahrenheit and outputs its equivalent in Celsius, using the following formula

Celsius = (Fahrenheit - 32 ) * (5/9)

4- Write a program to accept two integers and check whether they are equal or not.

5- Write a C++ program to check whether a given number is positive or negative

6- Write a C++ program to check whether a given number is even or odd

7-*** Write a C++ program to find whether a given year is a leap year or not

8- Write a program to find the largest of three numbers.

9- Write a program to read any day number in integer and display day name in the word (where 1 --> Sunday, 7 --> Friday)

10- Write a program to read any Month Number in integer and display Month name in the word

11-*** Write a program that Sum the odd and even numbers from 1 to an upperbound

Example: Enter the upperbound: 1000 The sum of odd numbers is 250000 The sum of even numbers is 250500 The difference is -500

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_2

Step: 3

blur-text-image_3

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

PC Magazine Guide To Client Server Databases

Authors: Joe Salemi

1st Edition

156276070X, 978-1562760700

More Books

Students also viewed these Databases questions

Question

How can you influence the powers that be to make changes?

Answered: 1 week ago

Question

Knowledge of process documentation (process flow charting)

Answered: 1 week ago