Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- /*
- * Declare an integer variable and assign it with the value 254 in
- * hexadecimal format (0x##). * Use Windows Calculator to find its hexadecimal representation.
- * Print the variable and ensure that the result is “254”.
- */
- class DeclareIntInHex
- {
- static void Main()
- {
- int number = 0xFE;
- Console.WriteLine(number);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement