To add to what Richard and Dave have said,
mark
isn't declared at all - and
markval
is a totally different variable, just as
ajbloke jarikpe
is not the same as
aj jarikpe
!
And never assume user input is accurate - they make mistakes, just like everyone else. So using Convert methods of user input just means that you app crashes when they mistype, and you know how annoying that is: it's probably happened to you.
Instead, use the <type>.TryParse methods instead:
double mark = double.MaxValue;
while (mark > 100)
{
string input = Console.ReadLine();
if (input.ToLower() == "q")
{
break;
}
double asValue;
if (double.TryParse(input, out asValue))
{
... process the data ...
}
else
{
... report a problem ...
}
}