Exercise 1 — Area CircCalculate the area and circumference of a circle using the formula pi [a constant of 3.14, use Const PI = 3.14] times radius squared. The radius is a Double entered by the user. Make it so the user can enter different radii and find the result. Format your answers to two decimal place.
Exercise 2 — Meter YardsWrite a program to convert Square Meters to Square Yards or Square Yards to Meters. The conversion factor is 1 meter = 1.1 yards. This is Meters to Yards. You will need to derive your conversion factor for Square Meters to Square Yards. Format your answer to 3 decimal places.
Exercise 3 — BananasFind the total cost of a purchase of bananas. Ask the user for the cost price of 1 kilo of bananas. Ask the user how many kilos they would like to buy. Your output should be the final bill formatted to 2 decimal places.[ex.: 4 kilos of bananas at $1.55 per kilo = $6.20]
Exercise 4 — Years SecondsWrite a program that works out the number of seconds in a year. Use that number to figure out how many seconds there are in any number of years input by the user. Assume a year is 365 days.
Exercise 5 — Inches CentimetersWrite a program which asks the user to input inches and centimeters. then convert inches to centimeters and centimeters to inches. Use 2.54 as the conversion rate. The conversion rate should be declared as a constant. The inches and the centimeters should be declared as a double.
Exercise 6 — School LabelWrite a program that asks the user for 5 inputs: his first name, last name, school, city, and province. It should output this approximately centered on the computer screen in 3 line. The first line should be the first and last name, the second line should be the school, the third line should be the city and province.
Exercise 7 — Address LabelWrite a program that asks the user for 5 inputs: his first name, last name, street address, city, and province. It should output this approximately centered on the computer screen in 3 line. The first line should be the first and last name, the second line should be the street address, the third line should be the city and province. They should be aligned left and look like an address label.
Exercise 8 — Hours MinutesWrite a program in which the user enters a number of minutes. The result should be in hours/minutes format. The output should look like this:
Enter the number of minutes: 411
That is 6 hours and 51 minutes
Exercise 9 — My HeightWrite a program that asks for your height in inches, then converts this to both feet and inches and centimeters and gives both of these as outputs.
Exercise 10— Four DigitWrite a program that accepts a 4 digit integer. The program should output the four numbers in separate lines.
Enter a 4 digit number: 2543
The first number is: 2
The second number is: 5
The third number is: 4
The fourth number is: 3
Exercise 11 — PizzaThe labour to make any pizza costs $1.35. In addition the cost of a pizza is determined by it's diameter according to the formula:
Cost = $0.08*diameter*diameter
Write a program to work out the cost of making a pizza, in which the user inputs the size of the pizza in inches, with the output being formatted to $xx.xx, dollars and cents.
Exercise 12 — BasketballWrite a program that asks for the number of people in a gym class. The program should then divide that number into 5 player basketball teams. The output should report how many teams there are and how many players are left over. The output should look like this:
Enter the number of students: 32
There will be 6 teams and 2 students left over
Exercise 13 — Int ModWrite a program that has the user enter two integers. The program should then display the results of the integer (\) and modulus (Mod) divisions in either order. The output should look like:
Enter the first integer: 26
Enter the second integer: 5
26 \ 5 = 5
5 \ 26 = 0
26 Mod 5 = 1
5 Mod 26 = 5
Exercise 14 — AliveAsk for inputs of a users birthday [the day, the month, and the year]. Ask for the current day, month and year. All inputs should be in numeric form. Make sure you label your requests clearly, so you obtain the required inputs. Assuming that each month has 30 days, calculate the number of days the user has been alive.
Exercise 15 — Body Mass IndexWrite a program that asks for your height in feet and inches, and your weight in pounds. The program should first convert your height to inches only. Then it should convert this to meters by multiplying by 0.0254. Your weight should be converted to kilograms by dividing by 2.2 You can then find your BMI [Body Mass Index] by dividing your mass in kilograms by your height in meters squared. BMI = kg/m^2. All your conversion factors should be declared as constants.