TOPIC
Runtime error - Preciso de ajuda! Need help!
Emmanuel14 asked 3 years ago
Então, acredito que o problema seja a leitura em diferentes linhas, mas n sei como faço isso xP pfvr, me ajude ;)
So, i believe the problem its the reading are in different lines, but idk how i do that xP pls, help me ;)
int r = 0;
string[] scan = Console.ReadLine().Split();
int a = int.Parse(scan[0]);
int n = int.Parse(scan[1]);
while (n <= 0)
n = int.Parse(Console.ReadLine());
for (int i = 0; i < n; i++)
{
r += a;
a++;
}
Console.WriteLine(r);
Obrigado! Thanks!
This topic was solved and cannot recieve new replies.