Reference no: EM131752
Question 1: Write a program that gives the following table. Use single cout statement and setw().
1990 123
1991 2345
1992 34567
1993 123456
Question 2: Write a program that reads the radius of circle and shows its area and diameter.
Question 3: Write a program that reads the height and length of rectangle and show the area and perimeter of the rectangle.
Question 4: Write a code that takes two integers and arithmetic operator from user and apply all given arithmetic operators on given numbers.
Question 5: Write a program that takes one side of square then evaluate and show the area of square.
Question 6: Write a program that reads the temperature from user in Celsius scale and display in Fahrenheit and Kelvin scale.
Question 7: Write a program that takes weight in kilograms and show in grams and milligrams.
Question 8: Write a program reads number from user and show either it is multiple of 2 or 5 or 7 or not multiple of any given category.
Question 9: Write a program that takes two time from user in hr:min:seconds format and show the difference between given two times.
Question 10: Prepare a program that takes two dates from user in dd/mm/yy and prints difference between given two dates.
Question 11: Write a program that takes three fractions a/b, e/f and c/d from user. Perform addition of given fractions as follow:
a c e ans
---- + ----- + ----- = --------
b d f ans
Question 12: Write a c program that takes marks of subject from user. Given marks must be greater than 0 and less than 100. Your program have to perform grading on given marks (A, B, C, D, F). You are free to decide grading criteria.
Question 13: Write a c program that takes four numbers from user and gives smallest and largest amongst them.
Question 14: Write a program asking user to select p for pine, o for oak, or M for mahogany. Show the price of the table pine - 100, oak- 225 and mahogany- 310 if user chooses any other than listed make price 0.
Question 15: A certain grade of steel is graded according to the subsequent condition:
- Hardness must be greater than 50.
- Carbon contents must be less than 0.7.
- Tensile strength must be greater than 5600
The grades are as follows:
- Grade is 10 if all the three conditions are met.
- Grade is 9 if conditions 1 and 2 are met.
- Grade is 8 if conditions 2 and 3 are met.
- Grade is 7 if conditions 1 and 3 are met.
- Grade is 6 if only one condition is met.
- Grade is 5 if none of the conditions are met.
Write a program which will need user to give values of hardness, carbon content and tensile strength of the steel under consideration.
Find and output the grade of the steel.