gashink_t

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

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