I am new to C#. I was consulting a book by Kanetkar and solving a basic exercise with Monodevelop on Ubuntu. I chose Empty C# file from new button on toolbar. Here is the program I typed.
using System;
namespace RameshSalaryQuest {
class RameshSalary {
static void Main (String[] args) {
double basic, dearness, rent, gross;
Console.WriteLine("Enter Ramesh's Basic Salary:");
basic = Convert.ToDouble(Console.ReadLine());
dearness = basic * 0.4;
rent = basic * 0.2;
gross = basic + rent + dearness;
Console.WriteLine("Ramesh's Gross Salary is:\t"+gross);
}
}
}
To Build --> F7 : Build Successful
To Run --> Ctrl + F5 : This gives the following output.
Enter Ramesh's Basic Salary:
Ramesh's Gross Salary is: 0
I am not even asked to input data. Where this went wrong?