This document provides 9 practice programming problems including: writing a program to add two numbers, find the average of three numbers, calculate the sum and percentage of 5 subjects, find the area of a circle and rectangle, convert temperatures between Fahrenheit and Celsius, swap the values of two variables, calculate an age based on a birth year, and multiply two numbers and calculate an age in months. The problems are presented by a trainer from Galgotias University to help students practice basic programming concepts.
This document provides 9 practice programming problems including: writing a program to add two numbers, find the average of three numbers, calculate the sum and percentage of 5 subjects, find the area of a circle and rectangle, convert temperatures between Fahrenheit and Celsius, swap the values of two variables, calculate an age based on a birth year, and multiply two numbers and calculate an age in months. The problems are presented by a trainer from Galgotias University to help students practice basic programming concepts.
This document provides 9 practice programming problems including: writing a program to add two numbers, find the average of three numbers, calculate the sum and percentage of 5 subjects, find the area of a circle and rectangle, convert temperatures between Fahrenheit and Celsius, swap the values of two variables, calculate an age based on a birth year, and multiply two numbers and calculate an age in months. The problems are presented by a trainer from Galgotias University to help students practice basic programming concepts.
1. Write a program for the addition of Two Numbers.
2. Write a program to Find the Average of Three Numbers. 3. Write a program to Calculate Sum of 5 Subjects and Find Percentage (Max Mark in each subject is 100). 4. Write a program to Calculate Area of Circle. 5. Write a program to Calculate Area of Rectangle. 6. Write a program to Convert Fahrenheit temperature in to Celsius. 7. Write a program to swap the values of two variables. 8. In the year 2001 Shreya was10 years old .Write the program calculate the age of Shreya in year 2021.
Solution:
9. a. Multiply the two numbers where you take the input from user and then print the result. b. Calculate the age in months.
Solution
Prepared By: Pragati Gupta
Trainer (Galgotias University ) YouTuber( catch the code)