#include <stdio.h>
int main()
{
char item_name[50];
int price;
int quantity;
int total;
printf("\nEnter the name of the item purchased: ");
scanf("%s",item_name);
printf("\nEnter price per item of the item purchased: ");
scanf("%d",&price);
printf("\nEnter the quantity of the item purchased: ");
scanf("%d",&quantity);
total=price*quantity;
printf("\nReceipt\n");
printf("\nItem name: %s",item_name);
printf("\nPrice per item: %d",price);
printf("\nQuantity: %d",quantity);
printf("\nTotal price: %d",total);
return 0;
}
Comments
Leave a comment