0
Why am i not geting user input?
4 Antworten
0
Try google an error that you've got in console.
0
Change single quotes to double quotes and line 42 Console instead of Consol. There might be more errors but first change this one.
0
Ty
- 1
Found these :
name = Console.ReadLine();
//no space before ().
double mark;
mark = Console.ReadLine();
'A' is a charecter.
'A+' is not charecter it is string.
There may be more.. I didnot check full...
Edit:
Icebreaker
var name =Console.ReadLine(); //no space and should in one line for var input.
double mark;
mark =(Convert.ToDouble(Console.ReadLine()));
//input string form should converted to double type.
string grade;
if (mark == 100.0){
grade = "A+";
//string assignment use double coutes.
// for string comparison, use Equals method not ==.
== compares reference Equal method compares contents. So
string aoran=(grade.Equals("A") ? aoran=" an " : aoran = " a ");