Data Types & Conversions (Exercise) – Learn C#

0  comments

This is an exercise for this YouTube video.

Happy learning and good luck!

[mlw_quizmaster quiz=1]

 

Assignment: Make a simple addition calculator which can add two numbers of user’s choice together.

 

 

Click to see the answer
static void Main(string[] args)
{
    double first = double.Parse(Console.ReadLine());
    double second = double.Parse(Console.ReadLine());

    double result = first + second;

    Console.WriteLine(result);

    Console.ReadLine();
}

 

 

 

 

 

 

 

 

 

 

 

 

 

About the author 

Matt Rešetár

Matt is an app developer with a knack for teaching others. Working as a freelancer and most importantly developer educator, he is set on helping other people succeed in their Flutter app development career.

You may also like

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}
>