SHARE
TWEET

שיעור 1 תרגיל 7

Ron_Kadouri Sep 15th, 2019 108 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. namespace Sum_Of_Two_Numbers
  3. {
  4.     class Program
  5.     {
  6.         static void Main(string[] args)
  7.         {
  8.             Console.WriteLine(" Hello World!");
  9.             int num1;
  10.             int num2;
  11.             int sum1;
  12.             int sum2;
  13.            
  14.             Console.WriteLine("Enter the First Slope: ");
  15.  
  16.             num1 = int.Parse(Console.ReadLine());
  17.  
  18.             Console.WriteLine("Enter the Second Slope:");
  19.  
  20.             num2 = int.Parse(Console.ReadLine());
  21.  
  22.             sum1 = (num1 * num2);
  23.             sum2 = (num1 + num1) + (num2 + num2);
  24.  
  25.  
  26.             Console.WriteLine("This is the surface: " + sum1);
  27.             Console.WriteLine("This is the perimeter: " + sum2);
  28.  
  29.             Console.ReadLine();
  30.         }
  31.     }
  32. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top