Last active
April 5, 2022 08:41
-
-
Save MP-C/c7d887c9c5dea04a6f9bc7d44c7814bd to your computer and use it in GitHub Desktop.
1. Les nombres entiers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace ConsoleApp1 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
short MaxValue = 0; | |
Console.WriteLine("maxValue " + MaxValue); | |
int x = 50; | |
Console.WriteLine("The new INT X: " + x); | |
x = (short)MaxValue; | |
Console.WriteLine("x = (short)MaxValue : " + x +'\n'); | |
long Y = 1234567891234567891; | |
Console.WriteLine("The new LONG Y: " + Y); | |
MaxValue = (short)Y; | |
Console.WriteLine("MaxValue = (short)Y " + MaxValue + '\n'); | |
short Z = 7789; | |
Console.WriteLine("The new short Z: " + Z); | |
Z = (short)MaxValue; | |
Console.WriteLine("new Z : " + Z); | |
ulong ResultSum = (ulong)x + (ulong)Y + (ulong)Z; | |
Console.WriteLine("ulong ResultSum = (ulong)x + (ulong)Y + (ulong)Z : " + ResultSum); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment