CS preLab question language C Write c assignment statements

CS preLab question language C

Write c assignment statements for the following operations, using appropriate valid identifiers: Conversion of degrees Fahrenheit into degrees Celsius Conversion of degrees Fahrenheit into degrees Rankine Conversion of degrees Celsius into Kelvins Conversion of height from feet and inches into centimeters Conversion of weight from pounds into newtons Calculation of mass in kilograms from the weight in newtons, assuming a gravitational acceleration of 9.807 m/s^2 Write c printf statements that do the following: A statement that asks the user to input their height in feet and inches, separating the two numbers by a space. Display an example as follows: (For example, if you are 6\'2\", type \"6 2\" at the prompt.) A series of statements that produce a table that shows temperature in different units, similar to the following: Write c scanf statements that do the following: A statement that takes two integers and stores them each in separate variables A statement that takes a double and stores it in a variable A statement that takes 3 characters and stores them each in separate variables

Solution

Assignments:

1. fahrenheit to celcius : celcius=(fahrenheit - 32)/1.8;

2. fahrenheit to rankine: r= f + 459.67

3. Celcius to kelvin: kelvin = C+273.16;

4. Feet and inches to centimetres: cm=(feet/3.26) * 100

5. Pounds to newtons : newtons= pounds * 4.448

6. mass from weight: Mass= weight/9.807

7. Printf(\"Enter height in feet and inches\");

scanf(\"%d %d\", &feet, &inches);

Printf(&Feet);

Printf(\" \")

Printf(&inches);

9. scanf(\"%d %d\", &a, &b)

10 scanf(\"%lf\", &a)

11 scanf(\"%c %c %c\", &first, &second, &third);

CS preLab question language C Write c assignment statements for the following operations, using appropriate valid identifiers: Conversion of degrees Fahrenheit

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site