Write console application that initializes at least five variables or constant with different data types then display their values. Provide a meaningful identifier of the variable or constant.
using System;
namespace MathApp
{
class Program
{
static void Main(string[] args)
{
int IntNumber = 1;
double DoubleNumber = 2.02;
bool BooleanVariable = true;
string StringVariable = "SomeText";
char CharVariable = 'a';
Console.WriteLine($"Int Number is {IntNumber}");
Console.WriteLine($"Double Number is {DoubleNumber}");
Console.WriteLine($"Boolean Variable is {BooleanVariable}");
Console.WriteLine($"String Variable is {StringVariable}");
Console.WriteLine($"Char Variable is {CharVariable}");
}
}
}
Comments
Leave a comment