Write a program(C#) that prompts the user for her home planet. Based on the user's input the...

50.1K

Verified Solution

Question

Programming

Write a program(C#) that prompts the user for her home planet.Based on the

user's input the program will display the following:

Input: earth

Message: earth. You are an Earthling and you have 10 fingers

Input: VENUS

Message: VENUS. You are a Venusian and you have 12 fingers

Input: Mars

Message: Mars. You are a Martian and you have 8 fingers

any other input

Message: I am sorry I don't know of that planet

You may use either the ToUpper() or ToLower() methods

You MUST USE A NESTED IF statement to solve this problem

[For full marks you need to accept all permutations of earth,venus and mars]

Answer & Explanation Solved by verified expert
4.2 Ratings (614 Votes)
using Systempublic class Test public static void Main String str ConsoleReadLine it will take input from user nested if    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students