Advertisement
kuruku

DeclareVariables

Apr 14th, 2014
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.65 KB | None | 0 0
  1. using System;
  2.  
  3. //Declare five variables choosing for each of them the most appropriate of the types byte, sbyte, short, ushort,
  4. //int, uint, long, ulong to represent the following values: 52130, -115, 4825932, 97, -10000. Choose a large enough
  5. //type for each number to ensure it will fit in it. Try to compile the code. Submit the source code of your Visual Studio
  6. //project as part of your homework submission.
  7.  
  8. class DeclareVariables
  9. {
  10.     static void Main()
  11.     {
  12.         ushort firstNumber = 52130;
  13.         sbyte secondNumber = -117;
  14.         int thirdNumber = 4825932;
  15.         byte forthNumber = 97;
  16.         short fifthNumber = -10000;
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement