#include <stdio.h>
main()
{
int package, tourist, TOTAL; /* declare variable */
puts("WELCOME TO SHAZA TOURISM SDN BHD\n"); /* output */
puts("====================================================="); /* output */
puts("Package no\t""Package Type\t\t""Package Rate per pax"); /* output */
puts("====================================================="); /* output */
puts("1\t""Langkawi\t\t""RM300\t"); /* output */
puts("2\t""Tioman\t\t""RM400\t"); /* output */
puts("3\t""Pangkor\t\t""RM210\t"); /* output */
puts("4\t""Cherating\t\t""RM350\t"); /* output */
printf("Please enter package number: "); /* requesting for input */
scanf( "%d", &package ); /* to receive input from user */
printf("Please enter number of tourist: "); /* requesting for input */
scanf( "%d", &tourist); /* to receive input from user */
if (package == 1) /* compare statement */
{
TOTAL=300*tourist; /* calculate */
printf("The total cost is %d",TOTAL); /* output */
}
if (package == 2) /* compare statement */
{
TOTAL= 400*tourist; /* calculate */
printf("The total cost is %d",TOTAL); /* output */
}
if (package == 3) /* compare statement */
{
TOTAL= 210*tourist; /* calculate */
printf("The total cost is %d",TOTAL); /* output */
}
if (package == 4) /* compare statement */
{
TOTAL= 350*tourist; /* calculate */
printf("The total cost is %d",TOTAL); /* output */
}
else puts("INVALID PACKAGE NUMBER"); /* output */
}