王道1

 1 #include<stdio.h>
 2 #include<stdlib.h>
 3 
 4 int cal(int *p)
 5 {
 6     if(*p < 5)
 7         printf("%d\n",*p);
 8     if(*p >=5 && *p < 15)
 9         printf("%d\n",*p + 6);
10     if(*p >= 15)
11         printf("%d\n",*p - 6);
12 }
13 int main()
14 {
15     int p;
16     scanf("%d",&p);
17     cal(&p);
18     system("pause");
19 }
posted @ 2021-01-06 22:44  8重8  阅读(76)  评论(0)    收藏  举报