0% found this document useful (0 votes)
10 views2 pages

Assignments

The document provides instructions for writing two C++ programs: one for calculating GPA based on grades and another for calculating BMI based on weight and height. The GPA program requires input of grades, assigns grade points, calculates the GPA, and determines academic standing. The BMI program accepts weight and height, computes the BMI, and categorizes the result into weight classifications.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views2 pages

Assignments

The document provides instructions for writing two C++ programs: one for calculating GPA based on grades and another for calculating BMI based on weight and height. The GPA program requires input of grades, assigns grade points, calculates the GPA, and determines academic standing. The BMI program accepts weight and height, computes the BMI, and categorizes the result into weight classifications.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Instructions (C++ Version):

1. Understand the GPA Calculation:


• The GPA is calculated based on grades from multiple subjects using the following grade-to-point
scale:
o A (90-100) = 4.0
o B (80-89) = 3.0
o C (70-79) = 2.0
o D (60-69) = 1.0
o F (Below 60) = 0.0
2. Write a C++ Program:
1. Input: Allow the user to input grades (percentage scores) for multiple subjects (e.g., Math,
Science, English, History).
2. Assign Grade Points: Use conditional statements to map each grade to a grade point based on
the scale above.
3. Calculate GPA: Average the grade points of all subjects.
4. Determine Academic Standing: Use conditional statements to categorize academic standing
based on the GPA:
o GPA 3.5 or above: Dean’s List (Excellent)
o GPA 2.0 - 3.49: Good Standing
o GPA below 2.0: Academic Probation
5. Output: Display the GPA and academic standing clearly.

Example Input and Output


Case 1 (Dean’s List):
Input:
• Math: 90
• Science: 95
• English: 85
• History: 92
Output:
Your GPA is 3.75. Congratulations, you are on the Dean’s List (Excellent)!
Case 2 (Good Standing):
Input:
• Math: 80
• Science: 75
• English: 85
• History: 82
Output:
Your GPA is 2.88. You are in Good Standing.
Case 3 (Academic Probation):
Input:
• Number of Subjects: 4
• Math: 60
• Science: 50
• English: 70
• History: 65
Output:
Your GPA is 1.3. You are on Academic Probation.
Instructions:
1. Understand the Formula:
Use the following formula to calculate BMI:
BMI = weight (kg) / (height (m) * height (m))

2. Write a C++ Program:


• Accept user input for weight (in kilograms) and height (in meters).
• Compute the BMI using the formula provided.
• Use conditional statements to interpret the BMI value based on these categories:
o Below 18.5: Underweight
o 18.5 - 24.9: Normal weight
o 25 - 29.9: Overweight
o 30 and above: Obese
3. Save the Program:
Save the program as bmi_calculator.cpp.

Example Output:
Case 1 (Normal Weight):
Input:
Weight = 70 kg
Height = 1.75 m
Output:
Your BMI is 22.86. You have a normal weight.

Case 2 (Overweight):
Input:
Weight = 80 kg
Height = 1.70 m
Output:
Your BMI is 27.68. You are overweight.

You might also like