Untitled
Guest 306 4th Dec, 2022
namespace Rekurencja
{
internal class Program
{
static int czyPierwsza(int a, int i)
{
if (a%i == 0 && a>i)
{
return czyPierwsza(a, i + 1);
}
else
{
if (a == i)
{
return 1;
}
else
{
return 0;
}
}
}
static void Main(string[] args)
{
Console.WriteLine("Podaj liczbe: ");
int liczba = Convert.ToInt32(Console.ReadLine());
int i = 2;
czyPierwsza(liczba, i);
}
}
}
To share this paste please copy this url and send to your friends
RAW Paste Data
Recent Pastes
- Untitled
Markup | 19 | 5 hours ago
- Untitled
Markup | 22 | 8 hours ago
- Wanted to see what your conviction is on this theme
Markdown | 12 | 9 hours ago
- Untitled
Markup | 63 | 1 day ago
- mega555kf7lsmb54yd6etzginolhxxi4ytdoma2rf77ngq55fhfcnyid.onion
Template Toolkit 2 | 24 | 1 day ago
- Untitled
Markup | 70 | 2 days ago
- Untitled
Markup | 76 | 2 days ago