Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApplication1
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. {
  14. Console.WriteLine("Iveskite 1 jei loptopas, 2 stacionarus jusu kompiuteris ");
  15.  
  16. var skaicius = Convert.ToInt32(Console.ReadLine());
  17.  
  18. while (skaicius !=1 && skaicius != 2)
  19. {
  20. Console.WriteLine("Blogai ivesta reiksme");
  21. Console.WriteLine("Iveskite kita reiksme");
  22. skaicius = Convert.ToInt32(Console.ReadLine());
  23. }
  24.  
  25. if (skaicius == 1)
  26. {
  27. Console.WriteLine("Jusu kompiuteris loptopas");
  28. }
  29. else if (skaicius == 2)
  30. {
  31. Console.WriteLine("Jusu kompiuteris stacionaras");
  32. }
  33. }
  34. }
  35. }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement