Desafío: Declaración de Variables con Tipo Explícito
- Declarar una variable llamada
bigValue
de tipo unsigned long. Inicializarla con un valor de123456789
. - Declarar una variable llamada
smallValue
de tipo integer. Inicializarla con un valor de1234
.
main.cs
using System.Drawing; using System; namespace ConsoleApp { internal class Program { static void Main(string[] args) { // Replace ___ with necessary data type ___ bigValue = 123456789; ___ smallValue = 1234; Console.WriteLine(bigValue); Console.WriteLine(smallValue); } } }
- La palabra clave para el tipo de dato unsigned long es
ulong
.
main.cs
using System; namespace ConsoleApp { internal class Program { static void Main(string[] args) { // Replace ___ with necessary data type ulong bigValue = 1234567; int smallValue = 1234; Console.WriteLine(bigValue); Console.WriteLine(smallValue); } } }
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 2. Capítulo 2