Question: I need help with my code. When I run it and enter an initial, for example k it comes out as You entered ' '

I need help with my code. When I run it and enter an initial, for example "k" it comes out as "You entered ' ' and uppercase is ''". I need to know how to have it come out as "you entered 'k' and uppercase is "K". Also I need to know how to have line 26 come out as a decimal as a result for cups * price. Line 27 needs to show the total from line 27 as well as the the information from lines 25 and 23. Finally I need to have the initial that the user put in line 19 repeated in line 28.I need help with my code. When I run it and enter

#define _CRT_SECURE_NO_WARNINGS //for Visual Studio compiler #pragma warning (disable: 6031) //ignore want warnings #include //for maintate and want #include //twunner and tratament #include int main() { char initial, upperInitial; int cups; double price; printf ("Hello my name is x, welcome to my coffee calculator "); printf("Enter your first initial "); scanf("%c", &initial); upperInitial = toupper(initial); llo printf(" you entered '%c' and uppercase is '%c' "), initial, upperInitial; //pri printf ("How many cups of coffee do you drink per day? "); //ask scanf("%d", &cups); printf ("What is the price per cup of coffee "); // scanf("%d", &price); printf(" %d" cups price); printf(" You are spending $ per day on cups of coffee at $ per cup"); printf(" Have a great day, '%c'"); // continue with the rest of the statements in order return 0; } *

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!