## Problem 2.5 :: The price of one kg rice is Rs. 16.75 and one kg sugar is Rs. 15. Write a program to get the value from the user and display the prices as follow:
***LIST OF ITEMS***
Item Price
Rice Rs. 16.75
Sugar Rs. 15.00


## Solutions ::

## Write down headers yourself.

void main()
{
float r,s;
clrscr();
printf("Enter the prices:");
scanf("%f %f",&r,&s);
printf("\n\n***LIST OF ITEMS***\n\n");
printf("Item Price\n\n");
printf("Rice Rs.%f",r);
printf("\n\nSugar Rs.%f",s);
getch();
}

0 comments