I just started to learn C# and I faced this problem: The Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Test_CSharp_
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Enter the number: ");
double num = Console.Read();
Console.WriteLine("Result = " + num*num);
}
}
}
When i give the input: 10 this is the output:
Enter the number:
10
Result = 2401
Press any key to continue . . .
pls help.
I use Visual Studio 2019 (community edition)