Question about Computers & Internet

1 Answer

Design a Menu-driven interactive programme to find out all the Capital cities of India using switch statement

Posted by on

Ad

1 Answer

  • Level 1:

    An expert who has achieved level 1.

    Mayor:

    An expert whose answer got voted for 2 times.

  • Contributor
  • 2 Answers

Import java.io.*;
public class capital
{
public static void main(String args[]) throws Exception
{
System.out.println("Enter 1 for Andra Pradesh");
System.out.println("Enter 2 for Arunachal Pradesh.");
System.out.println("Enter 3 for Assam.");
System.out.println("Enter 4 for Bihar.");
System.out.println("Enter 5 for Chhattisgarh.");
System.out.println("Enter 6 for Goa.");
System.out.println("Enter 7 for Karnataka.");
System.out.println("Enter 8 for Gujrat.");
System.out.println("Enter 9 for Haryana.");
System.out.println("Enter 10 for Himachal Pradesh.");
System.out.println("Enter 11 for Mizoram.");
System.out.println("Enter 12 for Jammu & Kashmir.");
System.out.println("Enter 13 for Jharkhand.");
System.out.println("Enter 14 for Kerala.");
System.out.println("Enter 15 for Madhya Pradesh.");
System.out.println("Enter 16 for Maharashtra.");
System.out.println("Enter 17 for Manipur.");
System.out.println("Enter 18 for Meghalaya.");
System.out.println("Enter 19 for Nagaland.");
System.out.println("Enter 20 for Orissa.");
System.out.println("Enter 21 for Punjab.");
System.out.println("Enter 22 for Rajasthan.");
System.out.println("Enter 23 for Sikkim.");
System.out.println("Enter 24 for Tamil Nadu.");
System.out.println("Enter 25 for Tripura.");
System.out.println("Enter 26 for Uttar Pradesh.");
System.out.println("Enter 27 for Uttaranchal.");

BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String read = br.readLine();
int ch = Integer.parseInt(read);

switch(ch)
{
case 1: System.out.println("Hyderabad");
break;
case 2: System.out.println("Itanager");
break;
case 3: System.out.println("Dispur");
break;
case 4: System.out.println("Patna");
break;
case 5: System.out.println("Raipur");
break;
case 6: System.out.println("Panaji");
break;
case 7: System.out.println("Bangalore");
break;
case 8: System.out.println("Gandhinagar");
break;
case 9: System.out.println("Chandigarh");
break;
case 10: System.out.println("Shimla");
break;
case 11: System.out.println("Aizawl");
break;
case 12: System.out.println("Srinagar(Summer) & Jammu(Winter)");
break;
case 13: System.out.println("Ranchi");
break;
case 14: System.out.println("Trivandrum");
break;
case 15: System.out.println("Bhopal");
break;
case 16: System.out.println("Bombay");
break;
case 17: System.out.println("Imphal");
break;
case 18: System.out.println("Shillong");
break;
case 19: System.out.println("Kohima");
break;
case 20: System.out.println("Bhubaneswar");
break;
case 21: System.out.println("chandigarh");
break;
case 22: System.out.println("Jaipur");
break;
case 23: System.out.println("Gangtok");
break;
case 24: System.out.println("Chennai");
break;
case 25: System.out.println("Agartala");
break;
case 26: System.out.println("Lucknow");
break;
case 27: System.out.println("Dehra Dun");
break;
default: System.out.println("Invalid entry!");
break;
}
}
}

(IGNOU - BCA - CS-74 - Q.4 - 2009)
Visit : Www.hamidraza.page.tl

Posted on Apr 23, 2009

Ad

1 Suggested Answer

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi,
a 6ya expert can help you resolve that issue over the phone in a minute or two.
Best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
the service is completely free and covers almost anything you can think of.(from cars to computers, handyman, and even drones)
click here to download the app (for users in the US for now) and get all the help you need.
Goodluck!

Posted on Jan 02, 2017

Ad

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

What are the best tourist places to visit in Raipur ?


Yes, the entire city is full populated with a range of stunning attractions that are culturally and historically significant. Raipur is one of the most amazing and wonderful cities of India. It is the capital of newly formed twenty sixth state of India known as Chhattisgarh. Chhattisgarh was set up after separating from Madhya Pradesh. The city of Raipur was recognized by the Kalchuri King Ram by the end of the fourteenth century. The city is ideally situated right in the middle of the state and hence it may be one of the factors for choosing it as the capital of the State.

Vivekananda Sarovar,popularly known as Budha Talab is one the of oldest water bodies and landmarks of the city of Raipur. It is placed in the area named as 'Purani Basti' meaning 'Old Settlement' which is said to be the oldest part of the city.

Jul 23, 2016 | Computers & Internet

1 Answer

In what country is the city of chiang mai located?


"Chiangmai", is the largest and most culturally significant city in northern Thailand. It is the capital of Chiang Mai Province, a former capital of the Kingdom of Lanna (1296-1768) and was the tributaryKingdom of Chiang Mai from 1774 until 1939. It is located 700 km (435 mi) north of Bangkok, among the highest mountains in the country. The city is along the Ping River, a major tributary of the Chao Phraya River. Chiang Mai means "new city" and was so-named because it was the new capital, founded in 1296, succeeding Chiang Rai (founded 1262) in the capital of the Lanna kingdom.

Jan 16, 2014 | Computers & Internet

1 Answer

I am not able to set time for cities in India with time differenc


Go this page, find your watch and click on INTERACTIVE SETTING INSTRUCTIONS.

http://www.citizenwatch.com/CUK/English/technicalinfo.asp?caliber=U600&ModelNumber=JY0000-53E

Rate me, please.

Jul 31, 2009 | Citizen Skyhawk Eco-Drive JR306059F Wrist...

1 Answer

I want to solution of this program.


In what language? VB?Java?C++? Will you have the data placed into the program or ll be obtained automatically from the net? This program ll be able to run in what operating systems?Will it be in a CD or what? Plz more infos!

May 04, 2009 | Computers & Internet

Not finding what you are looking for?
Computers & Internet Logo

Related Topics:

339 people viewed this question

Ask a Question

Usually answered in minutes!

Top Computers & Internet Experts

Doctor PC
Doctor PC

Level 3 Expert

7733 Answers

kakima

Level 3 Expert

102366 Answers

David Payne
David Payne

Level 3 Expert

14161 Answers

Are you a Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...