Write a program to display a grocery bill of the product purchased in the small market by Vijay. Get the following details from Vijay: Get the product name Get the price of the product(Price per Unit) Get the quantity of the product purchased Input and Output Format: Refer sample input and output for formatting specification. All float values are displayed correct to 2 decimal places. All text in bold corresponds to input and the rest corresponds to output. Test Case 1 Input (stdin) soap 33.00 2 Expected Output Product Details soap 33.00 2 Bill:66.00 Test Case 2 Input (stdin) chocolate 11.11 5 Expected Output Product Details chocolate 11.11 5 Bill:55.55
#include <stdio.h>
int main()
{
char a[20];
float b,d;
int c;
scanf("%s %f %d",a,&b,&c);
printf("Product Details");
printf("\n%s",a);
printf("\n%.2f",b);
printf("\n%d",c);
d=b*c;
printf("\nBill:%.2f",d);
return 0;
}