I
I
ILYA542019-10-02 21:58:02
.NET
ILYA54, 2019-10-02 21:58:02

How to deduce local variable from if {} to make it global?

5d94f254af85a378920974.png
5d94f25d16393440827707.png
5d94f26443dc6511978087.png

Answer the question

In order to leave comments, you need to log in

4 answer(s)
M
Mikhail, 2019-10-02
@mikhail_matyasov

Please describe exactly what you need. It's not clear from the pictures. Or show the full code with comments.

D
Diffins, 2019-10-03
@Diffins

It seems that someone is doing a lab, downloaded the left code and now tests it :)
Krch, the problem is that you are not passing a number to age. Age is a number. The name is a word. Therefore, you will see how you entered the name and height (you passed the word and the number, respectively), and you do not pass the number to the age (namely, it needs it).
Did you really go to cut the post without even trying to enter exactly the number into the program in the age field?

K
Korben5E, 2019-10-03
@Korben5E

What should Convert.ToInt32 do with the "fgd" value?

A
Alexander Volkov, 2019-10-03
@a_volkov1987

You don't seem to understand the code. Or the code is not yours at all. But in any case, you did not even realize that the age will be assigned to a person only if it is entered in numbers. But when you try to write height in non-numbers, your (or not) application will crash with an error.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question