Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Program
- {
- static void Main(string[] args)
- {
- float subtractionResult = Subtraction(5, 4);
- float additionResult = Addition(3, 5);
- PrintFormattedText(subtractionResult.ToString(), additionResult.ToString());
- Console.ReadKey();
- }
- public static float Subtraction(float number1, float number2)
- {
- return number1 - number2;
- }
- public static float Addition(float number1, float number2)
- {
- return number1 + number2;
- }
- public static float Multiplication(float number1, float number2)
- {
- return number1 * number2;
- }
- public static void PrintFormattedText(string text1, string text2)
- {
- Console.WriteLine("Formatted text:\nResult1: {0} \nResult2: {1}", text1, text2);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement