- 1

I don't know what's wrong with code why it does not work??? Can someone help me please..

https://code.sololearn.com/c4TQtuGn2usx/?ref=app

5th Mar 2020, 7:05 AM
Addy
Addy - avatar
5 Respostas
+ 4
Console.WriteLine(x+a+y);
5th Mar 2020, 8:38 AM
hossein B
hossein B - avatar
+ 3
Let's take a look on errors when we run the code......it's say "xay is not exist in context"....it's clear now.....that you are using a variable not EXISTED ...you haven't declare a variable named "xay" so you can't use it before declaring it
5th Mar 2020, 7:51 PM
Muhannad Damlakhi
Muhannad Damlakhi - avatar
+ 2
Ok....The compiler doesn't understand like us.....when you need to out two variables or more behind each other.....you MUST have "+" ...between each other.....so....The compiler will understand that you want to out first variable behind second .....even when you want to out a space between variable ....you must write this..... Console.Write(x+" "+y); That line will out a value of x then space then value of y......that's it.....I hope you get it now😊☺
6th Mar 2020, 1:22 PM
Muhannad Damlakhi
Muhannad Damlakhi - avatar
+ 1
You wrote variable xay, but you don't have it. If you want to output this variables write this: Console.WriteLine(
quot;x = {x}, a = {a}, y = {y}");
5th Mar 2020, 7:17 AM
_yaroslavv [online_everyday]
_yaroslavv [online_everyday] - avatar
0
But I had declared all variables separately... and doing so I expected a operator would be placed in between other two variables (i. e. x and y).. what else could be done..
6th Mar 2020, 5:31 AM
Addy
Addy - avatar