Lab Task Latest v2
Lab Task Latest v2
TASKS TO PERFORM
The tasks listed below need to be completed:
Write a C++ program to calculate the radius, diameter, and area of a circle from a given
value of the circumference of a circle. The circumference of the circle is 62.8580. Your
program computes and displays the radius, diameter, and area of a circle.
Write a C++ program that takes five integer values from the user and perform basic
arithmetic along with average calculation.
Write a C++ program that converts light year to miles, kilometers, and meters.
Write a C++ program that asks the user to input mass in pounds and heights in inches,
and calculate body mass index (BMI).
Write a program that calculates the remainder and quotient of two numbers
entered by user and display the answers.
Write a C++ program that asks the user to input three integer values, computes the cube
of each number, and then finds their average.
Write a C++ program that takes two inputs from the user and calculates the square root of
the sum of their squares. In this program, the user inputs values for ‘a’ and ‘b’, and then the
square root of the sum of their squares is calculated and displayed.
Write a C++ program to print characters based on the ASCII code inputs.
PERFORMANCE
1. WRITE A C++ PROGRAM TO CALCULATE THE RADIUS, DIAMETER, AND
AREA OF A CIRCLE FROM A GIVEN VALUE OF THE CIRCUMFERENCE OF A
CIRCLE. THE CIRCUMFERENCE OF THE CIRCLE IS 62.8580. YOUR
PROGRAM COMPUTES AND DISPLAYS THE RADIUS, DIAMETER, AND AREA
OF A CIRCLE.
1.1 CODE
The screenshot of the C++ code for the above problem is down below:
1.2 OUTPUT
The output for the given program is:
2. WRITE A C++ PROGRAM THAT TAKES FIVE INTEGER VALUES FROM THE
USER AND PERFORM BASIC ARITHMETIC ALONG WITH AVERAGE
CALCULATION.
2.1 CODE
The screenshot of the C++ code for the above problem is down below:
2.2 OUTPUT
The output for the given program is:
3. WRITE A C++ PROGRAM THAT CONVERTS LIGHT YEAR TO MILES,
KILOMETERS, AND METERS.
3.1 CODE
The C++ code for the above problem is down below:
3.2 OUTPUT
The output for the given program is:
4. WRITE A C++ PROGRAM THAT ASKS THE USER TO INPUT MASS IN POUNDS
AND HEIGHTS IN INCHES, AND CALCULATE BODY MASS INDEX (BMI).
4.1 CODE
The screenshot of the C++ code for the above problem is down below:
4.2 OUTPUT
The output for the given program is:
5.1 CODE
The screenshot of the C++ code for the above problem is down below:
5.2 OUTPUT
The output for the given program is:
6. WRITE A C++ PROGRAM THAT ASKS THE USER TO INPUT THREE INTEGER
VALUES, COMPUTES THE CUBE OF EACH NUMBER, AND THEN FINDS
THEIR AVERAGE.
6.1 CODE
6.2 OUTPUT
7. WRITE A C++ PROGRAM THAT ASKS THE USER TO INPUT THREE INTEGER
VALUES, COMPUTES THE CUBE OF EACH NUMBER, AND THEN FINDS
THEIR AVERAGE.
7.1 CODE
7.1 OUTPUT
8. WRITE A C++ PROGRAM TO PRINT CHARACTERS BASED ON THE ASCII CODE
INPUTS.
8.1 CODE
8.2 OUTPUT