4
Answers

Basic doubt By a Beginner Please Help?????????

santosh muppidi

santosh muppidi

15y
3.7k
1
using System; using System.Collections.Generic; using System.Text; namespace Accounts.home { class Program { static void Main(string[] args) { int a; Console.WriteLine(" 1.Goutham Narne \n 2.Santosh Muppidi \n 3.Phani Annamarajua \n 4.Srinavasa Reddy Gaddam \n 5.Pradeep Reddy Chinthala \n 6.Satish Reddy Ala \n 7.Durgam Vamshi Krishna \n 8. Naveen Kumar Basa"); Console.WriteLine("Select the Person:-"); a=Int32.Parse(Console.ReadLine() ); if (a >= 1 || a <= 8) { switch (a) { case 1: Console.WriteLine("Goutham Narne"); break; case 2: Console.WriteLine("Santosh Muppidi"); break; case 3: Console.WriteLine("Phani Annamaraju"); break; case 4: Console.WriteLine("Srinivasa Reddy Gaddam"); break; case 5: Console.WriteLine("Pradeep Reddy Chinthala"); break; case 6: Console.WriteLine("Sathish Reddy Ala"); break; case 7: Console.WriteLine("Durgam Vamshi Krishna"); break; case 8: Console.WriteLine("Naveen Kumar Basa"); break; default: Console.WriteLine("Invalid Option"); break; } } } } } //*************Please copy and paste it on ur IDE for clear understanding. Now my doubt is how do i enter the loop and run it again for a<1 or a>8 , Please help ?????//
Answers (4)