Iam just a beginer and learning C# Language. Iam getting the "Input String was not in the correct format". The code was given below.
namespace WhileDemo
{
class Program
{
static void Main(string[] args)
{
int count = 1;
int principal,roi ,noy;
float si;
while (count <= 3)
{
Console.WriteLine("Enter the values of principal,rate of interest,years");
principal = Convert.ToInt32(Console.ReadLine());
roi = Convert.ToInt32(Console.ReadLine());
noy = Convert.ToInt32(Console.ReadLine());
si = (principal * roi * noy) / 100;
Console.WriteLine("The simple interest is :\t" +si);
count = count + 1;
}
}
}
}
Please help me to fix the above problem.
Jayakumar