int based Fahrenheit and Celsius (Centigrade) Scales

image_pdfimage_print
   
  

using System;

public class Class1 {
    public static void Main(string[] args) {
        int nFahr = 100;
        int nBaseFahr;
        nBaseFahr = nFahr - 32;

        int nCelsius;
        nCelsius = (nBaseFahr * 100) / (212 - 32);

        Console.WriteLine(nCelsius);

    }
}

   
     


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