Guest User

Untitled

a guest
Jun 24th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace prace_17
  7. {
  8. class Program
  9. {
  10. static void Main(string[] args)
  11. {
  12. Console.WriteLine(Int32.MaxValue+" "+ uint.MaxValue+" "+ short.MaxValue+" "+ ushort.MaxValue+" "+ long.MaxValue+" "+ulong.MaxValue+" "+byte.MaxValue+" "+sbyte.MaxValue+" "+double.MaxValue+" "+ decimal.MaxValue);
  13. Console.WriteLine(Int32.MinValue + " " + uint.MinValue + " " + short.MinValue + " " + ushort.MinValue + " " + long.MinValue + " " + ulong.MinValue + " " + byte.MinValue + " " + sbyte.MinValue + " " + double.MinValue + " " + decimal.MinValue);
  14. int inta = Int32.MaxValue;
  15. short shorta;
  16. shorta = (short)inta;
  17. long longa = long.MaxValue;
  18. byte bytea = byte.MaxValue;
  19. longa = bytea;
  20.  
  21. int a = 3;
  22. switch (a)
  23. {
  24. case 0: a = 1; break;
  25. case 1: a = 2; break;
  26. case 2: a = 3; break;
  27. default: a = 10; break;
  28. }
  29. Console.WriteLine(a);
  30. a = (a < 15) ? 5 : a;
  31. Console.WriteLine(a);
  32.  
  33. for (int i = 0; i < 10; i++)
  34. {
  35. Console.Write(i + " ");
  36. }
  37. Console.WriteLine();
  38.  
  39. for (int i = 0; i < 10; i++)
  40. {
  41. if (i == 2)
  42. break;
  43. Console.Write(i + " ");
  44. }
  45.  
  46.  
  47.  
  48. }
  49. }
  50. }
Add Comment
Please, Sign In to add comment