Practice Set 1
Create a new project named "yourname_Practice_1"
Complete the following tasks:
Complete the following tasks:
Part 1: Marks Program
Write a program to display the following output similar to the following:
Subject Marks
Mathematics 90
Computer 77
Chemistry 69
French. 82
____________________________
Average 79.5%
- welcome user to the program
- use cout / cin statements to have user enter each value
- use loops to ensure each value entered is within range (0 - 100%)
- use escape sequences \n and \t
- correct commenting
Extensions:
- loop to allow the user to repeat the program for a new set of values (Ex 1 for yes, 2 for no)
- calculate and display average and / or GPA
Write a program to display the following output similar to the following:
Subject Marks
Mathematics 90
Computer 77
Chemistry 69
French. 82
____________________________
Average 79.5%
- welcome user to the program
- use cout / cin statements to have user enter each value
- use loops to ensure each value entered is within range (0 - 100%)
- use escape sequences \n and \t
- correct commenting
Extensions:
- loop to allow the user to repeat the program for a new set of values (Ex 1 for yes, 2 for no)
- calculate and display average and / or GPA
Part 2. Temperature Conversion Assignment
- Write a program which allows user to choose what type of temperature conversion they want to do. .
- Enter Farenheit convert to centigrade
- Enter Centigrade convert to Farenheit
- The choices could be (1) for... (2) for ... or F, f, C, c ... whichever you choose. Make sure their choice is valid
- Formulae to use
- C = 5/9(°F – 32)
- F = 9/5°C + 32
- Incorporate minimum and maximum values - you need to decide what would be acceptable limits. Do some research.
- Loop to allow the user to repeat the program for a new set of values (Ex 1 for yes, 2 for no, or y, Y, n, N)
- You will be assessed on
- Accuracy of calculations
- Presentation
- Commenting
- Extensions:
- Include an option to convert temperatures into and out of Kelvin