Do calculation with int variable

image_pdfimage_print
   
  

using System;
public class MainClass {
    static void Main(string[] args) {
        int a;
        a = -42;
        Console.WriteLine("{0}", a);

        int b = 2;
        int c = 42;
        a = b * -c;
        Console.WriteLine("{0}", a);
    }
}

   
     


This entry was posted in Data Types. Bookmark the permalink.