0% found this document useful (0 votes)
23 views

Lab Task Latest v2

This document outlines 8 programming tasks to be completed in C++, including calculating values for geometric shapes, performing arithmetic operations and averages on user inputs, converting between units of measurement, calculating BMI and remainders/quotients. For each task, the student's code and output is displayed as evidence of completing the assignments. The tasks involve a range of programming fundamentals like user input, calculations, and output display.

Uploaded by

231996
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views

Lab Task Latest v2

This document outlines 8 programming tasks to be completed in C++, including calculating values for geometric shapes, performing arithmetic operations and averages on user inputs, converting between units of measurement, calculating BMI and remainders/quotients. For each task, the student's code and output is displayed as evidence of completing the assignments. The tasks involve a range of programming fundamentals like user input, calculations, and output display.

Uploaded by

231996
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Assignment Name Lab Task Submitted By

Subject Programming Fundamentals Muhammad Ehtisham Amjad


Submitted to Dr. Naseer Jan Dated
Program BSSE-II-B February 27, 2024

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. WRITE A PROGRAM THAT CALCULATES THE REMAINDER AND QUOTIENT


OF TWO NUMBERS ENTERED BY USER AND DISPLAY THE ANSWERS.

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

You might also like