อยาก​ทำวนหลูบ กับระบบทอนเงิน​ทำอย่าง​ไร?

กระทู้คำถาม
#include <stdio.h>
#include <conio.h>
void main(){
 int movie,Day,Time,seat,price,ticket,name,email;
 float total;
 printf("MOVIES COMINGSOON \n");
 printf("MOVIES TICKETS SYSTEM \n");
 printf("====MOVIES LIST===== \n");
 printf("[1] BROKER \n"); 
 printf("[2] CHERRY MAGIC THE MOVIE \n");
 printf("[3] MINIONS THE RISE OF GRU \n");
 printf("[4] MON-RUK-WUA-CHON \n");
 printf("[5] DEEMO \n");



 printf("MOVIES NOW SHOWING \n");
 printf("MOVIES TICKETS SYSTEM \n");
 printf("====MOVIES LIST===== \n");
 printf("[1] JUJUTSU KAISEN 0 \n"); 
 printf("[2] OX-HEAD VILLAGE \n");
 printf("[3] LIGHTYEAR \n");
 printf("[4] FAST AND FEEL LOVE \n");
 printf("[5] JURASSIC WORLD DOMINION \n");
 printf("Please select movies by enter number : ");
 scanf("%d",&movie);
 if(movie==1)
 {
 printf("YOU SELECT : JUJUTSU KAISEN 0 \n ");
 }
 else if(movie==2)
 {
 printf("YOU SELECT : OX-HEAD VILLAGE \n "); 
    } 
 else if(movie==3)
 {
 printf("YOU SELECT : LIGHTYEAR \n "); 
    } 
 else if(movie==4)
 {
 printf(" YOU SELECT : FAST AND FEEL LOVE \n "); 
    } 
    else if(movie==5)
 {
 printf("YOU SELECT : JURASSIC WORLD DOMINION \n "); 
    } 
    else 
 {
 printf("NO LIST MOVIES \n "); 
    } 
    printf("Please select Day by enter number : ");
 scanf("%d",&Day);
 if(Day==1)
 {
 printf("YOU SELECT : MONDAY \n ");
 }
 else if(Day==2)
 {
 printf("YOU SELECT : TUESDAY \n "); 
    } 
 else if(Day==3)
 {
 printf("YOU SELECT : WEDNESDAY \n "); 
    } 
 else if(Day==4)
 {
 printf(" YOU SELECT : THURSDAY \n "); 
    } 
    else if(Day==5)
 {
 printf("YOU SELECT : FRIDAY \n "); 
    } 
    else if(Day==6)
    {
    printf("YOU SELECT : SATURDAY \n "); 
 }
 else if(Day==7)
    {
    printf("YOU SELECT : SUNDAY \n "); 
    }
     printf("Please select Time by enter number : ");
 scanf("%d",&Time);
 if(Time==1)
    {
 printf("YOU SELECT : 9.00AM-11.00AM \n ");
 }
 else if(Time==2)
 {
 printf("YOU SELECT : 13.00PM-16.00PM \n "); 
    } 
 else if(Time==3)
 {
 printf("YOU SELECT : 17.00PM-20.00PM \n "); 
    }
    
    printf("====TYPE OF SEAT====");
    printf("[1] DELUXE Price= 20.000 kip. \n ");
    printf("[2] PREMIUM Price=30.000 kip. \n ");
    printf("[3] SOFA SUIT Price=300.000 kip. \n");
    printf("Please enter number type pf seat : ");
    scanf("%d",&seat);
 if (seat==1)
 {
 price = 20.000 ; 
 printf("YOU SELECT : [1] NORMAL Price= 20.000 kip. \n ");
 }
 else if(seat==2)
 {
 price = 30.000 ;
 printf("YOU SELECT : [2] PREMIUM Price=30.000 kip. \n "); 
    } 
 else if(seat==3)
 {
 price = 300.000 ;
 printf("YOU SELECT : [3] SOFA SUIT Price=300.000 kip. \n "); 
    } 
    else
    {
     printf("Don't have seat");
 }
    printf("Please enter number ticket : ");
    scanf("%d",&ticket);
    total = ticket*price;
    printf("total price : % 2.3fkip \n",total);
    printf("enter your name: \n");
    scanf("%c \n",&name);
    printf("enter your email: \n");
    scanf("%s \n",&email);
    
 getch();



}
แสดงความคิดเห็น
โปรดศึกษาและยอมรับนโยบายข้อมูลส่วนบุคคลก่อนเริ่มใช้งาน อ่านเพิ่มเติมได้ที่นี่