stoyanov_gs

CSharp - PDTaV - 1 task

May 19th, 2013
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.87 KB | None | 0 0
  1. using System;
  2.  
  3. class FiveNumbers
  4. {
  5.     static void Main()
  6.     {
  7.         //Defining Variables
  8.         ushort _52130 = 52130; //Using ushort type because 52130 is between 0 and 65535
  9.         sbyte _115 = -115; //Using sbyte type because -115 is between -128 and 127
  10.         uint _4825932 = 4825932; //Using uint type because 4825932 is between 0 and 4294967295
  11.         byte _97 = 97; //Using byte type because 97 is between 0 and 255
  12.         short _10000 = -10000; //Using short type because -10000 is between -32768 and 32767
  13.  
  14.         //Executing the values of the variables and a text representing their type
  15.         Console.WriteLine("{0} is ushort type. \n" +
  16.             "{1} is sbyte type.\n" +
  17.             "{2} is uint type.\n" +
  18.             "{3} is byte type.\n" +
  19.             "{4} is short type.\n",
  20.             _52130, _115, _4825932, _97, _10000);
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment