Friday, October 10, 2008

Final Question!...


#include
#define perkilo 25.5
/* Programmed by Harvey Losin */

/* http://www.bikoy.com/harvey */

/* webmaster@bikoy.com */


main()
{
int kilo;
float amount;
clrscr();
printf("This program will ask the user to input the kilos");
printf("\n How many kilos of rice you want to buy?:");
scanf("%d",&kilo);
amount=perkilo*kilo;
printf("\nThe price per kilo of rice is P%d,perkilo")
;printf("\nThe kilos of rice you bought is %d",kilo);
printf("\nYou will pay P%.2f",amount);
getche();
}

No comments: