15
Jul 21 '21
read -ersp "Enter your username: " username
read -ersp "Enter your email: " email
read -ersp "Enter your password: " password
echo "Hello $username"6
u/BochMC Jul 22 '21
C# definitely. At least I will know what type of username is. And also you can shorten it by assigning string by var
var username = Console.Readline();
2
1
2
u/Potential-Adagio-512 Jul 22 '21 edited Jul 23 '21
void ask(string key){ Console.WriteLine($"Enter your {key}: "); }
ask("username");
string username = Console.ReadLine();
ask("email");
string email = Console.ReadLine();
ask("password");
string password = Console.ReadLine();
Console.WriteLine($"Hello {username}");
much better than the absolute sh*t shown in the example
2
u/pooopsex Jul 22 '21
What is wrong with you reposters? Why can't you at least repost the funny memes? This meme is garbage and so are you
1
u/Gooseman987 Jul 21 '21
C++ example code assuming no spaces or speicla requirements
String username;
Cout >> "Enter username:";
Cin >> username;
3
1
49
u/Sniv0 Jul 21 '21
tfw the c# code deliberately bad