## 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();
}
Get the value from user and display prices
Posted by Bijon Labels: ansi c balagurusamy, ansi c solutions, balagurusamy programming solution, c how to program solutions, c programing, c programming tutorial, homework solution, problem solutions, program solutions
Subscribe to:
Post Comments (Atom)


0 comments
Post a Comment