Blog

1IT1 Code Request






Sa lhat ng student ko ng Intro to Prog. ito na ung request nyo..
hehe..


#include<stdio.h>
#include<conio.h>

int main()
{

float burger=25.00,fries=15.00,drinks=10.00,total,change,money;
int b,f,d;

clrscr();

printf("1.Burger\t%.2f",burger);
printf("\n2.Fries\t\t%.2f",fries);
printf("\n3.Drinks\t%.2f",drinks);

printf("\n\nMay i take your order?");
printf("\nNo. of burgers:");
scanf("percent d",&b); // <- % d dpat na mgkatabi
printf("\nNo. of fries:");
scanf("percent d",&f);//  <- % d dpat na mgkatabi
printf("\nNo. of drinks:");
scanf("percent d",&d);// <- % d dpat na mgkatabi

total = (fries*f) + (burger*b) + (drinks*d);

printf("\nPlease pay %.2f",total);

printf("\nInput payment amount:");
scanf("percent f",&money); // <- % f dpat na mgkatabi
change=money-total;
printf("\nChange is %.2f\nThank you!",change);

getch();
return 0;

}





  1. ian` section`1I.T.1ian` section`1I.T.107-06-2009

    SOLOMOT SIR! + repu XD

    Leave a Reply

    More in class, letran (20 of 26 articles)


    1IT1 Intro to Prog ito na un download link ng TurboC.. Sensya na late ko na naipost.. [download id="3"] please ...