12 Проект по модулю C# | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

12 Проект по модулю C#

Нужно создать программу для подсчёта площади круга, я способен вывести только одно значение, но там нужно сделать 3 варианта. При попытке добавить ещё пару радиусов, соответственно, выводиться ещё пару дополнительных площадей и ответ не подходит ни к одному из результатов. Console.ReadLine(); требует аргумент, а я не могу его ввести. Важная деталь - я с телефона занимаюсь, может в этом проблема? https://code.sololearn.com/c0hiKssfjbhr/?ref=app

26th Feb 2021, 4:33 PM
Equestrian MLP
Equestrian MLP - avatar
4 Answers
+ 5
Console.ReadLine does not take any arguments, but you have to put () at the end; Console.ReadLine returns a string that you need to convert to a integer. Like this int_input = Convert.ToInt32(Console.ReadLine()); In the sololearn playground you can give multiple inputs, but you have to separate them with a "return" https://code.sololearn.com/cjFMaFOyPR1Y
26th Feb 2021, 7:37 PM
sneeze
sneeze - avatar
+ 2
You have to read the input for the radius first.
26th Feb 2021, 7:42 PM
JaScript
JaScript - avatar
+ 2
Thank you very much, I read the lesson 3 times and understood everything.
26th Feb 2021, 7:57 PM
Equestrian MLP
Equestrian MLP - avatar
+ 2
Keep asking, keep coding
26th Feb 2021, 7:58 PM
sneeze
sneeze - avatar