Guest User

Untitled

a guest
Dec 10th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 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 ConsoleApplication2
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. while(true)
  14. {
  15.  
  16. try
  17. {
  18.  
  19. Console.WriteLine("introduza um numero");
  20. int num1 = Convert.ToInt32(Console.ReadLine());
  21. Console.WriteLine("introduza um numero");
  22. int num2 = Convert.ToInt32(Console.ReadLine());
  23. Console.WriteLine(num1 + num2);
  24. break;
  25.  
  26.  
  27. }
  28. catch
  29. {
  30. Console.WriteLine("S T O P deu erro ");
  31.  
  32.  
  33. }
  34. }
  35. }
  36. }
  37. }
Add Comment
Please, Sign In to add comment