Guest User

Untitled

a guest
Jun 17th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. {
  2. static int Addera(int x, int y)
  3. {
  4. return x + y;
  5. }
  6.  
  7. static void Main(string[] args)
  8. {
  9. int tal1, tal2, tal3;
  10.  
  11. Console.WriteLine("Ange tre tal");
  12. tal1 = Convert.ToInt32(Console.ReadLine());
  13. tal2 = Convert.ToInt32(Console.ReadLine());
  14. tal3 = Convert.ToInt32(Console.ReadLine());
  15. Addera(tal1, tal2);
  16.  
  17. Console.WriteLine("Summan av två av dina tal blir {0}", Addera(tal1, tal2));
  18.  
  19. Console.WriteLine("Summan av dina tre tal blir {0}", Addera(tal1, tal2), tal3);
  20. }
  21. }
Add Comment
Please, Sign In to add comment