Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

LAB 3: SIMPLE PROGRAMS II Write C++ programs on 1. Convert the time in seconds to hours, minutes and seconds [1 hr =3600 sec) For

image text in transcribed
LAB 3: SIMPLE PROGRAMS II Write C++ programs on 1. Convert the time in seconds to hours, minutes and seconds [1 hr =3600 sec) For E.g: 4680 seconds Answer: 1hr 18 minutes 0 seconds 2. Convert distance in mm to cm, inch, and feet. The input is distance in mm. The output is to print the distance in centimeters, then in inch and after that in feets. The following conversions can be used. [1 cm =10mm, linch=2.5cm, 1 feet =12 inches] 3. To input P, N and R and Compute simple and compound interest [Hint: SI = PNR/100, CI =P (1+R/100) N - P] 4. To find the sum of the digits of a four-digit number (Eg: N = 1234, then sum=10] - without looping s. To determine how much money in rupees) is in a piggy bank that contains denominations of Rs. 20, Rs. 10, 5 rupee and some 50 paisa coins. Use the following values to test your program: 13 twenty rupee notes, 11 ten rupee notes, 7 five rupee coins and 13 fifty paisa coins. (Hint: answer is Rs.411.5] 6. Write a program to calculate the mass of air in an automobile tire. [Hint: PV=0.37m (T+460) where P = pressure, pounds per square inch (psi), V = volume, cubic feet, m= mass of air, pounds, T = temperature, degrees Fahrenheit] The tire contains 2 cubic feet of air. Assume that the pressure is 32 psi at room temperature

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Pro Database Migration To Azure Data Modernization For The Enterprise

Authors: Kevin Kline, Denis McDowell, Dustin Dorsey, Matt Gordon

1st Edition

1484282299, 978-1484282298

More Books

Students also viewed these Databases questions

Question

What are the different software development cycle techniques ?

Answered: 1 week ago