Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApplication1
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Ange en siffra mellan 1 - 3");
- start:
- int tal = int.Parse(Console.ReadLine());
- switch (tal)
- {
- case 1:
- Console.WriteLine("Du angav 1");
- break;
- case 2:
- Console.WriteLine("Du angav 2");
- break;
- case 3:
- Console.WriteLine("Du angav 3");
- break;
- default:
- Console.WriteLine("Du angav felaktigt alternativ");
- goto start;
- break;
- }
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement