Yamentou

Untitled

Sep 15th, 2020
1,113
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3. namespace HelloWorld
  4. {
  5.   class Program
  6.   {
  7.     static int Divide(int a, int b) {
  8.         return a/b;
  9.     }
  10.        
  11.     static void Main(string[] args)
  12.     {
  13.         try {
  14.             int x = 6; //int = data type, x = variable (storage space in computer memory), 6 = value to store in x
  15.             int y = 3;
  16.             int z = Divide(x, y);
  17.            
  18.             Console.WriteLine("aksjhdkjshdjkas" + z);
  19.             //Concatenation is combining two ore more strings for display    
  20.         }
  21.         catch(Exception ex) {
  22.             Console.WriteLine("There was an error. Program will exit.");
  23.             Console.WriteLine(ex.Message);
  24.         }
  25.     }
  26.   }
  27. }
  28.  
RAW Paste Data