Calculates the energy required, Civil Engineering

Write a program called, A1Q1, that reads a single letter.   It will then display the corresponding ASCII code of the letter and prints the next character and the character which is corresponding to the "ASCII code + 3".  Comment on the unusual behaviour if you enter 'z' or 'Z' or '9' or '@'.  Shorthand operators and increment/decrement operators should be used in your code.

2. Write a program called A1Q2, that calculates the energy needed to heat water from an initial temperature to a final temperature. Your program should prompt the user to enter the volume of water in gallons and the initial and final temperatures in Fahrenheit. The formula to compute the energy isenergy = mass * (temperatureFinal - temperatureInitial ) * 4184 where 'mass' is in Kg; temperatures are in degrees Celsius and  'energy' is in J.  You will need to convert the inputs to the proper units (1 gallon = 3.785 litres).  Use constants not numeric literals to define physical constants and conversion factors.  What happens if the user enters the values as octal or hexadecimal numbers?

Here is a sample run:

Enter the amount of water in gallons: 11.5 

Enter the initial temperature in F: 55.2 

Enter the final temperature in F: 78.5 

To heat the water of 43.5275 kg from 12.8889 C to 25.8333 C, the required energy is 2357.43 KJ.

Posted Date: 3/8/2013 6:03:09 AM | Location : United States







Related Discussions:- Calculates the energy required, Assignment Help, Ask Question on Calculates the energy required, Get Answer, Expert's Help, Calculates the energy required Discussions

Write discussion on Calculates the energy required
Your posts are moderated
Related Questions
Determine the stage of Cracking moment of pre-stress  At the stage of transfer of pre-stress in the pre-stressed beam element, only the pre-stressing force and the self weight

Explain the Bridge Selection Criteria - Underwater inspection? Various factors influence the bridge selection criteria. As a minimum, all structures must receive routine underw

Calculate the Poissons Ratio: In separate experiments, Young's Modulus and Rigidity Modulus of a material have been determined as 120 GPa and 50 GPa respectively. Calculate th

Q. Show the Differences Between GGBS and PFA? The use of GGBS as substitute of cement improves smaller reliance on PFA. Particularly GGBS is supposed to be more compatible with


Why we need a high strength concrete in prestressing There is another aspect to why we need a high strength concrete in prestressing. Prestressed concrete is subjected to high

This is an optional team assignment. This grade will replace your lowest two homework grades. You may work in teams of 3-4 students. Design the lightest concrete cantilever beam

Explain the Tertiary Treatment for Wastewater Tertiary Treatment: in cases where secondary treatment is not adequate (particularly if the discharges are into a sensitive water

Why IRC 37-2012 has taken 90th percentile for pavement design of expressway or NH while they hav taken 80th percentile for state highway design ????????