Need help with this code, can you do it on c pls.
Ask the user for their first, middle and last initials (3 char variables).
Ask the user how many orders of coffee they want. (single coffee price is 2.99).
Calculate the order total (ignore tax).
Using printf output the users initials and how much they owe.
//pls give +va rating,thanks!
#include <stdio.h>
int main(void) {
char first[20],middle[20],last[20];
int number_of_orders;
printf("Enter first name followed by middle name and last name separated by space: ");
scanf("%s%s%s",first,middle,last);
printf("Enter number of coffee orders: ");
scanf("%d",&number_of_orders);
//print the name along with the order total
printf("Customer name : %s %s %s\n",first,middle,last);
printf("Order total: %.2f\n",number_of_orders*2.99);
return 0;
}
==========================================
//output
Enter first name followed by middle name and last name separated
by space: Sara J johnson
Enter number of coffee orders: 2
Customer name : Sara J johnson
ORder total: 5.98
Need help with this code, can you do it on c pls. Ask the user for...