作者在 2010-06-19 18:15:48 发布以下内容
#include "stdio.h"
#include "conio.h"
#include "math.h"
#include "conio.h"
#include "math.h"
main()
{
float i,k,m,result;
int j;
printf("hello\n");
printf("====================================================================\n") ;
do{printf("\t\tCHOOES ONE:\n\t\t1:jiafa\n\n\t\t2.jianfa\n\n\t\t3.chengfa\n\n\t\t4.chufa\n\n\t\t5.kaigenhao\n\n\t\t6.zhizuoren\n");
printf("====================================================================\n");
printf("thank you\n");
scanf("%d",&j);
printf("choose one %d\n",j);/*选一个不是选一*/
switch(j)
{
case 1 :
printf("===================================================================\n");
printf("\t\tinput i and k:\t\t");
scanf("%f %f",&i,&k);
printf("%f+%f=%f\n",i,k,i+k);break;
case 2:
printf("===================================================================\n");
printf("\t\tinput i and k:\t\t");
scanf("%f %f",&i,&k);
printf("%f-%f=%f\n",i,k,i-k);break;
case 3:
printf("===================================================================\n");
printf("\t\tinput i and k:\t\t");
scanf("%f %f",&i,&k);
printf("%f*%f=%f\n",i,k,i*k);break;
case 4:
printf("===================================================================\n");
printf("\t\tinput i and k:\t\t");
if("k==0")
scanf("%f %f",&i,&k);
printf("%f/%f=%f\n",i,k,i/k);break;
case 5:
printf("===================================================================\n");
printf("\n\t\tkai gen hao yun suan\t\t\n");
printf("\t\tinput a:\t\t");
scanf("%f",&m);
result = sqrt(m);
printf("\t\tThe square root of %lf is %lf\t\t\n",i,result);break;
case 6:
printf("===================================================================\n");
printf("write by lee yao\n");
printf("===================================================================\n");
}
}while(j<7);
printf("===================================================================\n");
printf("see you later\n");
{
float i,k,m,result;
int j;
printf("hello\n");
printf("====================================================================\n") ;
do{printf("\t\tCHOOES ONE:\n\t\t1:jiafa\n\n\t\t2.jianfa\n\n\t\t3.chengfa\n\n\t\t4.chufa\n\n\t\t5.kaigenhao\n\n\t\t6.zhizuoren\n");
printf("====================================================================\n");
printf("thank you\n");
scanf("%d",&j);
printf("choose one %d\n",j);/*选一个不是选一*/
switch(j)
{
case 1 :
printf("===================================================================\n");
printf("\t\tinput i and k:\t\t");
scanf("%f %f",&i,&k);
printf("%f+%f=%f\n",i,k,i+k);break;
case 2:
printf("===================================================================\n");
printf("\t\tinput i and k:\t\t");
scanf("%f %f",&i,&k);
printf("%f-%f=%f\n",i,k,i-k);break;
case 3:
printf("===================================================================\n");
printf("\t\tinput i and k:\t\t");
scanf("%f %f",&i,&k);
printf("%f*%f=%f\n",i,k,i*k);break;
case 4:
printf("===================================================================\n");
printf("\t\tinput i and k:\t\t");
if("k==0")
scanf("%f %f",&i,&k);
printf("%f/%f=%f\n",i,k,i/k);break;
case 5:
printf("===================================================================\n");
printf("\n\t\tkai gen hao yun suan\t\t\n");
printf("\t\tinput a:\t\t");
scanf("%f",&m);
result = sqrt(m);
printf("\t\tThe square root of %lf is %lf\t\t\n",i,result);break;
case 6:
printf("===================================================================\n");
printf("write by lee yao\n");
printf("===================================================================\n");
}
}while(j<7);
printf("===================================================================\n");
printf("see you later\n");
getch();
}
}