int main()
{
int x
scanf("%d",&x)
int m,n
m=x/慧郑10
n=x%10
switch(n)
{ case 1: printf("Faint signals, barely perceptible")break
case 2: printf("Very weak signals")break
case 3: printf("Weak signals"裂轮)break
case 4: printf("Fair signals")break
case 5: printf("Fairly good signals")break
case 6: printf("Good signals")break
case 7: printf("Moderately strong signals")break
case 8: printf("Strong signals")break
case 9: printf("Extremely strong signals"前源颂)break
default :printf("worng")break
}
printf(", ")
switch(m)
{ case 1: printf("unreadable")break
case 2: printf("barely readable, occasional words distinguishable")break
case 3: printf("readable with considerable difficulty")break
case 4: printf("readable with practically no difficulty")break
case 5: printf("perfectly readable")break
default :printf("worng")break
}
printf(".")
return 0
}
#include <signal.h>#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
void my_func(int sign_no)
{
if(sign_no==SIGINT)
printf("I have get SIGINT\n")
else if(sign_no==SIGTERM) 肆旅袜
printf("I have get SIGQUIT\n")
}
int main()
{
printf("Waiting for signal SIGINT or SIGTERM \n ")
printf("process is %d\n ",getpid())
signal(SIGINT, my_func)
signal(SIGTERM, my_func)
while(1)
裂激 镇绝exit(0)
}
linux 平台就 用while阻塞就行
不知道你用的是什么平台?
送巧搜慧分题
#include<stdio.h>int main()
{
char a,b,c
scanf("%c%c"孝答,&a,&b)
printf("%c%c, %c.\n",b+48,b+48,a+48)
漏基 return 0
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)