C++实验一《C++基础编程》

/*#include<iostream>
using namespace std;
int  max(int a=1,int b=2,int c=3);
int max1(int a,int b)
{
    int k;
    if(a>b)
        k=a;
    else
        k=b;
    return k;
}
inline int max()
{}
int max(int a,int b,int c)
{
/*    max1(a,b);
        return max1(max1(a,b),c);*
    int h;
    if(a>b)
        h=a;
    else
        h=b;
    if(h<c)
        h=c;
    return h;*
}
int main()
{
    cout<<max1(31,53)<<endl;
//    max();
    cout<<max(16,45,54)<<endl;
    system("pause");
    return 0;
}
/*{
    int a=11;
    int b=22;
    int c=0;
    int *pi=&a;
    int *pc=&b;
    int *pd=&c;
    *pd=*pi;
    *pi=*pc;
    *pc=*pd;
    cout<<a<<b<<endl;
    system("pause");
    return 0;
}
/*{
    int a=1;
    int b=2;
    int &c=a;
    int &e=b;
    int temp=c;
    c=e;
    e=temp;
    cout<<a<<b<<endl;
    system("pause");
    return 0;
}
/*{
    double*pd=new double [10];
    double k;
    for(int i=0;i<10;i++)
        cin>>pd[i];
    for(int j=0;j<9;j++)
    {
        if(pd[j]>pd[j+1])
        {
            k=pd[j];
            pd[j]=pd[j+1];
            pd[j+1]=k;
        }
        if(j==8)
        cout<<pd[j+1]<<endl;    
    }
    system("pause");
    return 0;
}*/

猜你喜欢

转载自blog.csdn.net/h6h26169i10l34fsgrh/article/details/85536156