0

How To use Input As Value in C# in If Condition

I Want To Say that if I Want User Input As Value How to Describe it In c# Like Age=Input if Age=>18 Type Welcome How to Type this As A Code In C#

1st Apr 2017, 3:12 AM
Deepak So Smart
Deepak So Smart - avatar
3 Réponses
+ 5
Did you mean something like this : https://code.sololearn.com/cOX00ZX4gm2K/?ref=app
1st Apr 2017, 3:40 AM
Wen Qin
Wen Qin - avatar
+ 1
thanks Bro
1st Apr 2017, 4:53 AM
Deepak So Smart
Deepak So Smart - avatar
+ 1
if (Convert.ToInt32(Console.ReadLine()) >= 18) { Console.Write("Welcome");}
2nd Apr 2017, 9:50 PM
Yhal Htet Aung
Yhal Htet Aung - avatar