Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int a = 18;
- int b = 6;
- int c = 23;
- int d = a * (b + c) - 43 + 73 * b;
- Console.WriteLine(d);
- int e = (a + b) / c;
- int f = (a + b) % c;
- Console.WriteLine($"quotient: {e}");
- Console.WriteLine($"remainder: {f}");
- int max = int.MaxValue;
- int min = int.MinValue;
- Console.WriteLine($"The range of integers is {min} to {max}");
- int what = max + 3;
- Console.WriteLine($"An example of overflow: {what}");
- //
- double g = 35;
- double h = 574;
- double i = 73;
- double j = (g + h) / i + 36 / 52 * h - 25 + g;
- Console.WriteLine(j);
- double maxx = double.MaxValue;
- double minn = double.MinValue;
- Console.WriteLine($"The range of double is {minn} to {maxx}");
- double third = 1.0 / 3.0;
- Console.WriteLine(third);
- //
- decimal miin = decimal.MinValue;
- decimal maax = decimal.MaxValue;
- Console.WriteLine($"The range of the decimal type is {miin} to {maax}");
- double l = 1.0;
- double m = 3.0;
- Console.WriteLine(l / m);
- //
- decimal n = 1.0M;
- decimal o = 3.0M;
- Console.WriteLine(n / o);
- //
- decimal PI = 3.1415926535897931M;
- decimal k = 2.5M;
- Console.WriteLine(k * k * PI);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement