zoukankan      html  css  js  c++  java
  • 1209

    #include<stdio.h>
    #include<math.h>
    int main(void)
    {
        double x1,x2,y1,y2,a,b,c,d;
    
        while(scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2)!=EOF){
            a=(x1-x2)*(x1-x2);
            b=(y1-y2)*(y1-y2);
            c=a+b;
            d=sqrt(c);
            printf("%.2f
    ",d);
        }
        return 0;
    }
    #include<stdio.h>
    int main(void)
    {
        int r,x,y,z,count=0;
        scanf("%d",&r);
        for(z=r;z!=x,z!=y,z>=5;z--){
            for(y=1;y<=r;y++){
                for(x=y+1;x<=r;x++){
                    if((x*x+y*y==z*z)&&(x+y>z))
                        count++;
                }
            }
        }
        printf("%d
    ",count);
        return 0;
    }
    #include<stdio.h>
    int main(void)
    {
        int a,b,c,d;
        scanf("%d %d %d %d",&a,&b,&c,&d);
        printf("%d %d %d
    ",a,b,c);
        printf("%d %d %d
    ",a,c,b);
        printf("%d %d %d
    ",b,a,c);
        printf("%d %d %d
    ",b,c,a);
        printf("%d %d %d
    ",c,a,b);
        printf("%d %d %d
    ",c,b,a);
        printf("%d %d %d
    ",a,b,d);
        printf("%d %d %d
    ",a,d,b);
        printf("%d %d %d
    ",b,a,d);
        printf("%d %d %d
    ",b,d,a);
        printf("%d %d %d
    ",d,a,b);
        printf("%d %d %d
    ",d,b,a);
        printf("%d %d %d
    ",a,c,d);
        printf("%d %d %d
    ",a,d,c);
        printf("%d %d %d
    ",c,a,d);
        printf("%d %d %d
    ",c,d,a);
        printf("%d %d %d
    ",d,a,c);
        printf("%d %d %d
    ",d,c,a);
        printf("%d %d %d
    ",b,c,d);
        printf("%d %d %d
    ",b,d,c);
        printf("%d %d %d
    ",c,b,d);
        printf("%d %d %d
    ",c,d,b);
        printf("%d %d %d
    ",d,b,c);
        printf("%d %d %d
    ",d,c,b);
    
        return 0;
    }
    #include <stdio.h>
    #include<string.h>
    int main(void)
    {    
        char stext[300],*p=stext;    
        gets(stext);
        int len=strlen(stext);
        char lastChar=stext[len-1];
        stext[len-1]='';
        while(*p) 
            p++;    
        for(p--;p>stext;p--){        
            if(*p==' '){
                printf("%s ",p+1);            
                *p='';
            }
        }
        printf("%s",stext);
        printf("%c
    ",lastChar);
        return 0;
    }
    #include<stdio.h> 
    #include<math.h> 
    int main(void) 
    { 
        double money,year,rate,sum; 
        scanf("%lf %lf %lf",&money,&year,&rate); 
        sum=money*pow(1+rate,year); 
        printf("%.1f
    ",sum); 
        return 0;  
    }
    #include<stdio.h>
    int main(void)
    {
        double x,y,z,s;
        scanf("%lf %lf",&x,&y);
        z=x*x+y*y;
        s=4.5*4.5;
        if(z<s)
            printf("in");
        else if(z>s)
            printf("out");
        else
            printf("on");
        return 0;
    }
    #include<stdio.h>
    int main(void)
    {
        int n,y;
        scanf("%d",&n);
        if(n<=160){
            y=n*10;
        }
        else{
            y=1600+(n-160)*30;
        }
        printf("%d
    ",y);
        return 0;
    }
    #include <stdio.h> 
    int main(void) 
    {     
        int i;     
        float M=0,N=0,sum=0;     
        scanf("%f %f",&M,&N);     
        sum=M;     
        if(N==1){            
            M=M/2; 
        } 
        else{        
            for(i=2;i<=N;i++){             
                sum+=M;             
                M=M/2; 
            } 
        } 
        M=M/2;        
        printf("%.2f %.2f",M,sum);     
        return 0; 
    }
  • 相关阅读:
    vb动态创建控件
    100多个很有用的JavaScript函数以及基础写法汇总
    CodeFile与CodeBehind的区别
    asp.net防sql注入问题
    .NET创建目录和文件
    Asp.Net判断字符是否是数字
    Asp.Net随机中文汉字验证码
    禁用表单自动提示complete
    如何隐藏vs2005的起始页
    Asp.Net enableEventValidation
  • 原文地址:https://www.cnblogs.com/xym0914/p/3464708.html
Copyright © 2011-2022 走看看