Answer to Question #315126 in C# for Saphira

Question #315126

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.

1
Expert's answer
2022-03-21T12:36:11-0400
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}");
        }
    }
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS