Answer to Question #209835 in C for Chandan

Question #209835

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



1
Expert's answer
2021-06-23T02:57:42-0400
#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);
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS