Guest User

Untitled

a guest
May 15th, 2017
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 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 FunctionsOrMethodsTraining
  8. {
  9.     class Program
  10.     {
  11.         static int a;
  12.         static void GetMax(int number1, int number2)
  13.         {
  14.             if (a < number2)
  15.             {
  16.                 a = number2;
  17.             }
  18.         }
  19.         static void Main(string[] args)
  20.         {
  21.             int a = 3;
  22.             int b = 5;
  23.             GetMax(a, b);
  24.             Console.WriteLine("The biggest number is {0}",a);
  25.         }
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment