Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- /*
- *Declare five variables choosing for each of them the most appropriate of the types byte, sbyte,
- *short, ushort, int, uint, long, ulong *to represent the following values: 52130, -115, 4825932,
- *97, -10000. *Choose a large enough type for each number to ensure it will fit in it.
- */
- class DeclareVariables
- {
- static void Main()
- {
- byte a = 97;
- sbyte b = -115;
- short c = -10000;
- ushort d = 52130;
- uint e = 4825932;
- long f = -1323111212331232131;
- ulong g = 18318496518131848651;
- Console.WriteLine(" byte numb -> {0} \n sbyte numb -> {1} \n short numb -> {2}", a, b, c);
- Console.WriteLine(" ushort numb -> {0} \n int numb -> {1}", d, e);
- Console.WriteLine(" long num -> {0} \n ulong numb -> {1}",f,g);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement