W
W
whistlewars2018-06-21 19:02:44
C++ / C#
whistlewars, 2018-06-21 19:02:44

The name 'y' does not exist in the current context. And why?

I'm learning C# from Schildt's book and ran into the first problem, help.

// Эта программа демонстрирует применение переменных.
using System;
class Example2 {
static void Main() {
int x; // здесь объявляется переменная
int у; // здесь объявляется еще одна переменная
х = 100; // здесь переменной х присваивается значение 100
Console.WriteLine("х содержит " + х);
у = х / 2;
Console.Write("у содержит х / 2: ");
Console.WriteLine(y);
}
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Kopendakov, 2018-06-21
@whistlewars

You have different letters 'y'
It looks like one is Russian and the other is Latin.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question