Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Problem 4. Variable in Hexadecimal Format
- //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”.
- using System;
- class VariableHexadecimalFormat
- {
- static void Main()
- {
- //Assign integer variable with 254 in hexadecimal format(0x##)
- int hexValue = 0xFE;
- Console.WriteLine(hexValue);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement