Joke Collection Website - Cold jokes - c语言程序设计

c语言程序设计

# include & ltstdio.h & gt# include & ltmath.h & gt作废?find num(void);

作废?find root(void);

作废?侦探(void);

作废?承担(作废);

作废?菱形(void);

作废?再见(作废);main()

{

int?我;

while(我!= 6)

{

printf("输入1——6来选择相关的菜单(输入6结束程序):");scanf("%d ",& ampI);开关(I)大小写?1:?find num();?打破;

案例?2:?find root();打破;

案例?3:?侦探();打破;

案例?4:?熊();?打破;

案例?5:?钻石();?打破;

案例?6:?再见();?打破;

默认?:printf("错误!!!\ n ");}

printf(" \ n ");作废?find num(void)

{

int?I =-1;

双倍?q,p;

while(I & lt;1)

{

q =(3+I)* 6237;

p =(1 * I+3)* 3564;

if(p = = q)

printf(" I = % d ",I);

i++;作废?FindRoot(void)

{

}

void?侦探(void){

int?I,j,k,l;

for(I = 11;我& lt=99;I = I+11)

for(j = ;j & lt=99;j = j+11)

{

k = I * 1+j;

l = sqrt(k);if(k = = l * l)printf("车牌号为:31%d”,k);作废?bear(void){

int?i=1,j = 1;

while(I & lt;= 1)

{

j++;

j = j * 2;

i++;}

printf("一***有%d个玉米“,j);作废?diamond(void){

int?j,I,k,l=1,n=1,m,t = 1;

printf("输入要输出的行数(奇数):");scanf("%d ",& ampj);

m = k = j/2+1;

for(I = ;j & gt我;i++)

{

if(I & lt;j/2+1)

{

printf("?);while(l & lt;= m)

{

printf("?);

l++;}

m-;

l = 1;while(l & lt;= n)

{

printf(" * ");

l++;}

printf(" \ n ");

n+= 2;

l = 1;}

else

{

l = 1;

printf(" ");while(l & lt;= t)

{

printf("?);

l++;l = 1;while(l & lt;= n-4)

{

printf(" * ");

l++;}

printf(" \ n ");

n = n-2;

t++;作废?再见(void)

{

printf("-好?BYE-\ n”);

}