Advertisement
Guest User

Untitled

a guest
Sep 20th, 2017
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.74 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 ConsoleApp4
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int x, y, z;
  14.  
  15.             Console.WriteLine("Please enter value for x");
  16.  
  17.             int.TryParse(Console.ReadLine(), out x);
  18.  
  19.             Console.WriteLine("Please enter value for y");
  20.  
  21.             int.TryParse(Console.ReadLine(), out y);
  22.  
  23.             Console.WriteLine("Please enter value for z");
  24.  
  25.             int.TryParse(Console.ReadLine(), out z);
  26.  
  27.             Console.WriteLine("(x+y)*z =  " + (x+y)*z);
  28.  
  29.             Console.WriteLine("x*y + y*z =  " + (x * y + y * z));
  30.  
  31.  
  32.         }
  33.     }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement