Advertisement
zarkoy

Untitled

Oct 16th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _05_AddSubstract
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. int firstNumber = int.Parse(Console.ReadLine());
  10. int secondNumber = int.Parse(Console.ReadLine());
  11. int thirdNumber = int.Parse(Console.ReadLine());
  12.  
  13. int result = Add(firstNumber, secondNumber);
  14. int finalResult = Substract(result, thirdNumber);
  15.  
  16. Console.WriteLine(finalResult);
  17.  
  18. }
  19.  
  20. public static int Add(int firstNumber, int secondNumber)
  21. {
  22. int result = firstNumber + secondNumber;
  23. return result;
  24. }
  25.  
  26. public static int Substract(int result, int thirdNumber)
  27. {
  28. int finalResult = result - thirdNumber;
  29. return finalResult;
  30. }
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement