Advertisement
Guest User

Untitled

a guest
Sep 19th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.49 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace ConsoleApp3
  7. {
  8.     class Program
  9.     {
  10.         static void function(ref int x) {
  11.             x = x * x;
  12.         }
  13.         static void Main()
  14.         {
  15.             int a = 5;
  16.             int n;
  17.             function(ref a);
  18.             Console.WriteLine(a);
  19.             function(ref a);
  20.             Console.WriteLine(a);
  21.             Console.ReadLine();
  22.        
  23.         }
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement