Answer to Question #235339 in C for Juli

Question #235339
Gopalan mall billing system
1
Expert's answer
2021-09-09T17:13:49-0400
#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;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS