Question: This is the Template: #include void power_of_ten( receive k and my_double from main function ) { /* Add your code here */ } /* end

This is the Template:

#include

void power_of_ten( receive k and my_double from main function ) {

/* Add your code here */

} /* end power_of_ten */

main() { int k; double my_double; scanf( "%d", &k ); power_of_ten( pass k and my_double to the function ); /* Hint: my_double must be passed by reference (i.e., using a pointer). */ /* Do not modify the following line. */ printf( "%.15lf ", my_double ); }

This is the Template: #include void power_of_ten( receive k and my_double from

main function ) { /* Add your code here */ } /*

Problem C C.1 Specification Write a C program to input an integer k. Compute 10* and store the result in a double variable. Display the result on the standard output using printf. C.2 Implementation The program is named lab4c.c. Use the given template lab4c.c and fill in your code. Assume that the input integer k is small enough so that 10* can be stored in a double variable named my double. Display on the standard output the result using the printf statement as follows: printf("}.1517 ", my_double ); B.3 Sample Inputs/Outputs indigo 152 % a.out Enter an integer> 1.000000000000000 indigo 153 * a. out Enter an integer>3 1000.000000000000000 indigo 154 % a.out Enter an integer>12 1000000000000.000000000000000 indigo 155 % a.out Enter an integer>15 1000000000000000. 000000000000000 indigo 156 % a.out Enter an integer>-1 0.100000000000000 indigo 157 % a.out Enter an integer>-10 0.000000000100000 indigo 158 % a. out Enter an integer>-14 0.000000000000010 indigo 159 % a.out Enter an integer>-15 0.000000000000001 indigo 160 % a. out Enter an integer>-16 0.000000000000000 In addition, all programs should follow the following guidelines: Include the stdio.h library in the header of your .c files. Use printf to print text and outputs according to the required formats. End each output result with a new line character' '. Do not use any C library functions except getchar(), putchar(), scanf() and printf(). Assume that all inputs are valid (no error checking is required on inputs)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!