Advertisement
ada1711

Untitled

Aug 29th, 2024
9
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. class Program
  2. {
  3. static void Main(string[] args)
  4. {
  5. float subtractionResult = Subtraction(5, 4);
  6. float additionResult = Addition(3, 5);
  7. PrintFormattedText(subtractionResult.ToString(), additionResult.ToString());
  8. Console.ReadKey();
  9. }
  10. public static float Subtraction(float number1, float number2)
  11. {
  12. return number1 - number2;
  13. }
  14. public static float Addition(float number1, float number2)
  15. {
  16. return number1 + number2;
  17. }
  18. public static float Multiplication(float number1, float number2)
  19. {
  20. return number1 * number2;
  21. }
  22.  
  23. public static void PrintFormattedText(string text1, string text2)
  24. {
  25. Console.WriteLine("Formatted text:\nResult1: {0} \nResult2: {1}", text1, text2);
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement