#include <stdio.h> #include <stdlib.h> int num (int i,int j); void pri (int num); int main() { int t; while (1) { printf ("Input a number\n"); scanf ("%d",&t); int j=2; pri (num (t,j)); } return 0; } void pri (int num) { if (num) printf ("The number is sushu\n"); else printf ("The number isn't sushu\n"); } int num (int i,int j) { return ((i==j || i==j-1) ? 1 :((i%j==0) ? 0 : (num (i,j+1))));/*判断质数*/ }