Mr. Rajesh and his friends plans for trip for Deepavali Holidays, as there are multiple opinions, they have some choices, depending on the choice they plan to go to that particular place. The choices are given below
Choice
Place
Kerala
2
Hyderabad Film City
Kodachadri
3
Otherwise
Following are the requirements
Read the choice
1. 2. Compare the choice
number
with the given
3. Display the Place name appropriately for the choice
selected
#include <stdio.h>
int main(void){
int choice;
printf("1. Place 1\n");
printf("2. Place 2\n");
printf("3. Place 3\n");
printf("Your choice: ");
scanf("%d",&choice);
if(choice==1){
printf("\nPlace is: Kerala\n");
}else if(choice==2){
printf("\nPlace is: Hyderabad Film City\n");
}else if(choice==3){
printf("\nPlace is: Kodachadri\n");
}else{
printf("\nWrong place\n");
}
getchar();
getchar();
return(0);
}
Comments
Leave a comment