+ 1
How to check for another input when solve the solution on Sololearn project
In many of my solution it ask me for many inputs but it doesn't take the terminal input. It checks for the first input only and then says error for another one. So what is the solution for this
5 ответов
+ 2
Abhay oh it works thank you so much
+ 1
Can you show us the code from one of your solution that is causing the problem ?
+ 1
Abhay
For example here is one in C#
namespace SoloLearn
{
class Program
{
static void Main(string[] args)
{
const double pi = 3.14;
double radius = 5;
double ans = radius * radius * pi;
Console.WriteLine(ans);
//your code goes here
}
}
}
+ 1
Abhay as you see the code is correct it is correct when the radius is 5. But it checks for many inputs so how can I do for others also
+ 1
Amansisa Tadese you need to take user input instead of assigning a fixed value . Sololearn will then test your program against various inputs.