Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

C language The \"identifier\" is the name of a variable. Invent a valid variable

ID: 2317534 • Letter: C

Question

C language

The "identifier" is the name of a variable. Invent a valid variable identifier for each of the following pieces of data, and write a declaration statement, assuming all variables are double floating point values 1) A reading in units of degrees Fahrenheit temperature 2) A distance measurement in units of miles 3) Length, height, and width measurements in units of meters (3 identifiers) 4) A temperature reading in units of degrees Rankine 5) A measure of force in units of pounds 6) A measure of force in unites of newtons 7) A measure of density in units of kg/m3 8) A measure of mass in units of kg 9) A measure of volume in units of m Write Cassignment statements for the following mathematical equations, using the previous identifiers: 10) Volume height width 11) Distance length/1609.3 12) Temperature(in degrees Rankine) 459.67 +Temperature (in degrees Fahrenheit) 13) Force (in pounds (1/4.4482216) Force (in newtons) 14) Density Mass/Volume

Explanation / Answer

Valid declaration Statements in sequence 1,2,3.....

   Identifier Choosen

1 Temperature in Fahrenhiet-----temperatureF

2.Distance----------------------------------d

3.Length,height,width l,h,w

4.Temperature in Rankine-------temperatureR

5.Force in Pounds---------------------forceP

6.Force in newtons--------------------forceN

7density--------------------------------density

8.mass-----------------------------------------m

9.Volume--------------------------------v

C declaration below

-------------------------

double temperatureF,d,l,h,w,temperatureR,forceP,forceN,density,m,v;

-------------------------------------------------

C- Assignement

-------------------------------

v=l*h*w;

d=l/1609.3;

temperatureR=459.67+temperatureF;

forceP=(1/4.4482216)*forceN;

density=m/v;

-----------------------------------