haha1235  

/计算圆面积/
#include<stdio.h> int main() { double r,s; printf("enter r:"); scanf("%lf",&r); if(r>0){ s=r*r; printf("s=%.2f\n",s); } else if(r<=0){ printf("you are wrong\n"); } return 0; }

 

 

 

 

 

 

#include<stdio.h>
int main()
{
    int c1,c2,c3,c4;
    scanf("%d%d",&c1,&c2);
    printf("%d\n",c1+c2);
    getchar();
    c3=getchar();
    c4=getchar();
    printf("%d\n",c3+c4);
    return 0;
}

 

 

 

 

 

 

#include<stdio.h>
int main()
{
    int c1,c2,c3,c4;
    scanf("%c%c",&c1,&c2);
    printf("%c%c\n",c1,c2);
    getchar();
    c3=getchar();
    c4=getchar();
    printf("%c%c\n",c3,c4);
    printf("%c%c%c%c\n",c1,c2,c3,c4);
    return 0;
}

 

posted on 2013-11-01 16:41  haha1235  阅读(191)  评论(0编辑  收藏  举报