Advertisement
adriyanbulgary

PrimitiveDataTypesAndVariablesC#

May 29th, 2014
282
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.38 KB | None | 0 0
  1. using System;
  2. /*
  3.  * Declare an integer variable and assign it with the value 254 in
  4.  * hexadecimal format (0x##). * Use Windows Calculator to find its hexadecimal  representation.
  5.  * Print the variable and ensure that the result is “254”.
  6.  */
  7. class DeclareIntInHex
  8. {
  9.     static void Main()
  10.     {
  11.         int number = 0xFE;
  12.         Console.WriteLine(number);
  13.     }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement