c# - Read user input from console -
I want a number from the user who is multiple with Pi number along with the number. I tried something like the one below but it has an effect in I'm not sure what your problem is (because you have not told us) , But I'm guessing It reads only one letter from your console. You can change your program on this. To make it even more strong, accept more than 1 letter input and validate that the input is actually a number: a for example, if I include
22 , it would contain
50 is.
Double A, B; A = console Read (); B = A * Monastery PI; Console.WriteLine (b);
a = console Read ();
Double A, B; Console Farewell line ("Itenton says A. ± yÄ ± Sonna .00 Coarac Yaz"); If (double. Terry purse (console. Readline (), outside one)) {b = a * math. PI; Console.lightline ("sonu" "b"); } Else {// the user gave an invalid input to handle it here}
Comments
Post a Comment