2024-02-26 14:06:32 +01:00
|
|
|
#include <stdio.h>
|
|
|
|
int main() {
|
2024-02-26 14:46:06 +01:00
|
|
|
long long num;
|
2024-02-26 14:59:17 +01:00
|
|
|
scanf("%lld", &num);
|
|
|
|
printf("%lld", num);
|
|
|
|
printf(" ");
|
2024-02-26 14:46:06 +01:00
|
|
|
long long pom=0;
|
2024-02-26 14:46:34 +01:00
|
|
|
for(long long i=2; i*i<=num; i++)
|
2024-02-26 14:06:32 +01:00
|
|
|
{
|
|
|
|
if(num%i==0)
|
|
|
|
{
|
|
|
|
pom++;
|
|
|
|
}
|
|
|
|
if(pom>0)
|
|
|
|
break;
|
|
|
|
}
|
2024-02-26 14:11:47 +01:00
|
|
|
if(pom>0 && num!=2 || num==1)
|
2024-02-26 14:06:32 +01:00
|
|
|
printf("Liczba nie jest pierwsza");
|
|
|
|
else
|
|
|
|
printf("Liczba jest pierwsza");
|
2024-02-26 14:46:06 +01:00
|
|
|
return 0; }
|