8.) (10) Evaluate the following expressions: a. fabs(-5.7) e. sqrt(-4.0) b. pow(
ID: 668305 • Letter: 8
Question
8.) (10) Evaluate the following expressions: a. fabs(-5.7) e. sqrt(-4.0) b. pow(3.0,4.0) f. floor(6.7) c. sqrt(100) g. ceil(4.1) d. floor(-10.3) h. ceil(-4.1) 9.) (8) Print the following with the correct manipulators: (a) length and width with just a tab between them (b) length and width, each with a decimal point and 6 positions of significance (c) length and width, each with a decimal point and 3 positions of significance (d) length and width in scientific notation with 4 positions of significance
Explanation / Answer
8.a absolute value = 5.7
8.b exponential 3^4 = 81
8.c square root of 100 = 10
8.d rounded downward = -11
8.e square root of -4.0 = NaN (Not a Number)
8.f rounded downward = 6
8.g The smallest integral value that is not less than 4.1 = 5
8.h The smallest integral value that is not less than -4.1 = -4
9.a printf ("The absolute value of -5.7 is %f ", fabs(-5.7));
9.b printf ("The value of 3^4 is %.6f ", pow(3.0,4.0));
9.c printf ("The value of square root of 100 is %.3f ", sqrt(100));
9.d printf ("The value rounded downward of -10.3 is %.4e ", floor(-10.3));
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.