gashink_t

является ли число простым

Feb 11th, 2020
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.19 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main() {
  4.     int a,s,i;
  5.     printf("vvedite chislo a = ");
  6.     scanf("%d", &a);
  7.     for (i=2; i<a; i++)
  8.         if (a%i==0) break;
  9.     if (i==a) printf("Good\n");
  10.     return 0;
  11. }
Add Comment
Please, Sign In to add comment