programming-examples/c-sharp/_Basic/C# Sharp program to that takes three numbers(x,y,z) as input and print the output of (x+y)úz and xúy + yúz.cs
2019-11-15 12:59:38 +01:00

16 lines
675 B
C#

using System;
public class Exercise10
{
public static void Main()
{
int number1, number2, number3;
Console.Write("Enter first number - ");
number1 = Convert.ToInt32(Console.ReadLine());
Console.Write("Enter second number - ");
number2 = Convert.ToInt32(Console.ReadLine());
Console.Write("Enter third number - ");
number3 = Convert.ToInt32(Console.ReadLine());
Console.Write("Result of specified numbers {0}, {1} and {2}, (x+y)·z is {3} and x·y + y·z is {4}\n\n",
number1, number2, number3, ((number1+number2)*number3), (number1*number2+number2*number3));
}
}