Czkafek
Czkafek
CC#
Created by Czkafek on 5/1/2023 in #help
How to return multiple variables?
now everything works
37 replies
CC#
Created by Czkafek on 5/1/2023 in #help
How to return multiple variables?
AAAAAA... yes
37 replies
CC#
Created by Czkafek on 5/1/2023 in #help
How to return multiple variables?
37 replies
CC#
Created by Czkafek on 5/1/2023 in #help
How to return multiple variables?
nope
37 replies
CC#
Created by Czkafek on 5/1/2023 in #help
How to return multiple variables?
for a non-satic field, method, or propert ... an object reference is required
37 replies
CC#
Created by Czkafek on 5/1/2023 in #help
How to return multiple variables?
37 replies
CC#
Created by Czkafek on 5/1/2023 in #help
How to return multiple variables?
thanks
37 replies
CC#
Created by Czkafek on 5/1/2023 in #help
How to return multiple variables?
hmm okay
37 replies
CC#
Created by Czkafek on 5/1/2023 in #help
How to return multiple variables?
thinking one writing another
37 replies
CC#
Created by Czkafek on 5/1/2023 in #help
How to return multiple variables?
whats*
37 replies
CC#
Created by Czkafek on 5/1/2023 in #help
How to return multiple variables?
thats record?
37 replies
CC#
Created by Czkafek on 5/1/2023 in #help
How to return multiple variables?
thanks
37 replies
CC#
Created by Czkafek on 5/1/2023 in #help
How to return multiple variables?
I see
37 replies
CC#
Created by Czkafek on 5/1/2023 in #help
How to return multiple variables?
em
37 replies
CC#
Created by Czkafek on 5/1/2023 in #help
How to return multiple variables?
How can I use tuples?
37 replies
CC#
Created by Czkafek on 5/1/2023 in #help
How to return multiple variables?
it has some error
37 replies
CC#
Created by Czkafek on 5/1/2023 in #help
How to return multiple variables?
its not too long
37 replies
CC#
Created by Czkafek on 5/1/2023 in #help
How to return multiple variables?
namespace Papier_kamien_nozyce
{
internal class Program
{
static void Main(string[] args)
{
string komputer = " ", user;
int win = 0, loss = 0, draw = 0;
var rand = new Random();
switch (rand.Next(2))
{
case 0:
komputer = "N"; break;
case 1:
komputer = "K"; break;
case 2:
komputer = "P"; break;
}
Console.WriteLine("P - papier, N - nożyce, K - Kamień");
user = Console.ReadLine();
if (user == "p")
{
Papier(user, komputer, win, loss, draw);
}

}

static int Papier(string user, string komputer, int win, int loss, int draw)
{
if (komputer == "N")
{
Console.WriteLine("Przegrałeś! Wyniki:");
Console.WriteLine();
}
return win;
return loss;
return draw;
}
}
}
namespace Papier_kamien_nozyce
{
internal class Program
{
static void Main(string[] args)
{
string komputer = " ", user;
int win = 0, loss = 0, draw = 0;
var rand = new Random();
switch (rand.Next(2))
{
case 0:
komputer = "N"; break;
case 1:
komputer = "K"; break;
case 2:
komputer = "P"; break;
}
Console.WriteLine("P - papier, N - nożyce, K - Kamień");
user = Console.ReadLine();
if (user == "p")
{
Papier(user, komputer, win, loss, draw);
}

}

static int Papier(string user, string komputer, int win, int loss, int draw)
{
if (komputer == "N")
{
Console.WriteLine("Przegrałeś! Wyniki:");
Console.WriteLine();
}
return win;
return loss;
return draw;
}
}
}
37 replies
CC#
Created by Czkafek on 5/1/2023 in #help
How to return multiple variables?
em okay
37 replies
CC#
Created by Czkafek on 5/1/2023 in #help
How to return multiple variables?
My code:
37 replies