Question: Programming in C PROGRAMMING IN C Finish the Greeting function implementation Implement the KmsToMiles function definition. Add the block of code for the Kms To

Programming in C

Programming in C PROGRAMMING IN C Finish the Greeting function implementation Implement

PROGRAMMING IN C Finish the Greeting function implementation Implement the KmsToMiles function definition. Add the block of code for the Kms To Miles function. This should be placed below the main function. a. Inside the function you will need to declare 2 double variables (miles and kilometers), get the kilometers from the user, calculate the miles (look up the formula(, and display the results - That will be done inside the function. You should interact with the user's first initial that is passed to the function. b. Ro test the function, you will need to make a function call from the main function. c. Note: the initial_in_main variable in the main function is local to the main function, when it is passed to the KmsToMiles function, a copy of the initial is used inside the function. Incomplete code provided to finish: 76 #define _CRT_SECURE_NO_WARNINGS //for Visual Studio compiler 77 #pragma warning( disable:6031) 1/ignore scanf warnings 78 #include //for printf and scanf 79 1/function prototypes here 8011 81 //greets the user 82 //asks, get, and returns the first initial 83 char Greeting(); 84 1/input: the users initial 85 //asks and gets kilometers, converts to miles 86 //prints the results 87 void KmsToMiles(char initial); 88 //input: the users initial 89 //asks and gets miles, converts to kilometers 90 1/prints the results 91 92 int main() 93 { 94 char initial_in_main; 95 initial_in_main = Greeting(); 96 //add the other function calls here 97 printf(" %c., Have a Great Day!", initial_in_main); 98 return 0; 99 } 100 //function definitons here 101 char Greeting() 102 { 103 char initial_in_Greeting; 104 printf(" Please enter your first initial:"); 105 scanf("%c", &initial_in_Greeting); 106 //welcome the user 107 return initial_in_Greeting; 108 }

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!