ช่วยดูโค้ดทีครับ ผิดตรงไหน
#include <stdio.h> #include <conio.h> void hilow(void); main() { int money100; int Player1; int Player2; int Player3; printf("\t\t\t"); printf("#################################\n\n\t\t\t"); printf("Welcome to Project High-Low\n\n\n\t\t\t"); printf("#################################\n\n"); int menu; do { printf("Please Enter Menu\n"); printf("High-Low\n"); printf("Exit\n"); scanf("%d",&menu); printf("You have money %d"); switch menu { case 1: hilo();break; default:printf("You have money %d Goodbye\n",money); } } } while(menu==1 || menu==2); void hilow(void); { int score,mark,bet; char play; do { if(money<5) { printf("Your money cant play Goodbye \n"); break; } do { printf("Please Enter Your bet \n"); scanf("%d",&bet); } while(bet<5 || bet>money ); money=money-bet; do { printf("Plase Enter Score \n 1.Hi \n 2. Low \n"); scanf("%d",&score); } while(!(score>0 && score <3)); randomize(); mark=random(1)+1; printf("Point is %d",mark); if(mark==score) { printf("You Win %d \n",2*bet); money=money+2*bet; } else { printf("Your lose\n"); } printf("Play Again(y/n)\n"); scanf("%c",&play); } while(play=='y') }
|