Learning Summary
1, with a certain language basis, operators and expressions These are very similar, there is no difference between the assignment operator (=), arithmetic operators (+ 、-、 *,/,%, + + 、——) and other operators (sizeof, (type)).
2, declare a parameter to create a called formal parameter (formal argument) or formal parameters (formal parameter). We call a function call passing a value called the actual parameter (actual argument) or the actual argument (actual parameter).
3, Programming exercises (Title 8):
1#include <stdio.h>2 voidTemperatures (DoubleFahrenheit);3 Const Doublec1=1.8l;4 Const DoubleC2= +.0l;5 Const Doublec3=273.16l;6 intMain () {7 DoubleFrh;8 while(1){9printf"Please enter Fahrenheit:");Tenscanf"%LF",&FRH); One if(frh==0){ A Break; - } - temperatures (FRH); theFrh=0; - } -printf"over!\n"); - return 0; + } - + voidTemperatures (Doublef) { Aprintf"fahrenheit=%.2f\n", f); atprintf"celsius=%.2f\n", c1*f+C2); -printf"kelvin=%.2f\n", c1*f+c2+C3); -}
Operation Result:
Please enter FAHRENHEIT:12
fahrenheit=12.00
celsius=53.60
kelvin=326.76
Please enter FAHRENHEIT:Q
over!
"C language Learning" C Primer Plus 5th operators, expressions, and statements