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

You will write several printf statements to achieve the results below, including

ID: 3753461 • Letter: Y

Question

You will write several printf statements to achieve the results below, including the line spacing. There is no room for creativity in this assignment. I want you to be able to control your print output to a specification. Start your code with: /* /*Your Name /* Lab3 t/ #include #include int main (void) You must use this variable int age25; double average-246.7531986; Obviously, your output will not say bielr on it. want the line spacing just as it appears below. Yes, you may move the starting brace to the end of the line above if you desire. Write one printf for each line that appears below * Regarding the quote and its attribution, you may do it in either one or two printf statements .When printing average, you must use both a total width and the after-the-decimal-point value in your conversion specifier. Remember to print your name and "Lab 3" in the output

Explanation / Answer

/*------------------------*/

/* Hanse */

/* Lab 3 */

#include <stdio.h>

#include <stdlib.h>

int main()

{

int age = 25;

double average = 246.7531986;

  

printf(" Hanse. Lab 3. ");

printf("The dog ran quickly. ");

printf("Joe is 25 years old. ");

printf(""So many books, so little time."");

printf(" -Frank Zappa ");

printf("The average = %.1f ", average);

printf("The average = %.3f ", average);

printf("The average = %.2e", average);

  

return 0;

}

Output:

Hanse. Lab 3.   

The dog ran quickly.

Joe is 25 years old.

"So many books, so little time."

-Frank Zappa

The average = 246.8   

The average = 246.753   

The average = 2.47e+02

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote