|
|
ช่วยแก้ warning ให้หน่อยค่ะ พอดีต้องส่งงานค่ะ แล้วอ.ไม่ให้มี warning น่ะค่ะ ช่วยหน่อยนะค่ะ |
|
|
|
|
|
|
|
#include <stdio.h>
#include <conio.h>
void main()
{
char c,ch;
start : clrscr();
int menu;
int n1=0,n2=0,n3=0,n4=0,n5=0;
int money1=0,money2=0,money3=0,money4=0,money5=0;
long int money=0;
{
printf("Enter your name : ");
scanf ("%s","name");
printf("\n-------------------------- Menu Today -------------------------");
printf("\n| 1.Pizza 299 bath/price 4.Water 10 bath/price ");
printf("\n| 2.Pasta 50 bath/price 5.Papsi 15 bath/price ");
printf("\n| 3.Sandwich 30 bath/price ");
printf("\n---------------------------------------------------------------");
printf("\n\nPlese selection menu\t:\t");
scanf("%d",&menu);
if(menu==1)
{
printf("How many unit : ");
scanf("%d",&n1);
money1=n1*299;
money=money+money1;
printf("Order pizza cost");
printf("unit=%d price= %d",n1,money1);
printf("\n");
}
else if(menu==2)
{
printf("How meny unit : ");
scanf("%d",&n2);
money2=n2*50;
money=money+money2;
printf("Order Pasta cost");
printf("unit=%d price= %d",n2,money2);
printf("\n");
}else if(menu==3)
{
printf("How meny unit : ");
scanf("%d",&n3);
money3=n3*30;
money=money+money3;
printf("Order Sandwith cost");
printf("unit=%d price= %d",n3,money3);
printf("\n");
}
else if(menu==4)
{
printf("How meny unit : ");
scanf("%d",&n4);
money4=n4*10;
money=money+money4;
printf("Order Water cost");
printf("unit=%d price= %d",n4,money4);
printf("\n");
}
else if(menu==5)
{
printf("How meny unit : ");
scanf("%d",&n5);
money5=n5*15;
money=money+money5;
printf("Order Papsi cost");
printf("unit=%d price= %d",n5,money5);
printf("\n");
}
}
{
printf("\nPress Y to do it again or Press N to exit the program : ");
scanf("%s",&c); ch=getchar();
if( c=='y' )
goto start;
else
goto quit;
quit :clrscr();
printf("Thank you!");
}
getch();
}
รบกวนหน่อยค่ะ ขอบคุณล่วงหน้านะค่ะ
Tag : - - - -
|
|
|
|
|
|
Date :
2011-02-19 14:45:04 |
By :
ขอบคุณค่ะ |
View :
942 |
Reply :
0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 05
|