C++(自用)第一章练习题程序

//#include <iostream>
//using namespace std;
//int main()
//{
//	cout <<"This"<<"is";
//	cout <<"a"<<"C++";
//	cout <<"program."<<endl;
//	return 0;
//} 



//#include <iostream>
//using namespace std;
//int main()
//{
//	int a,b,c;
//	a=10;
//	b=23;
//	c=a+b;
//	cout <<"a+b=";
//	cout <<c;
//	cout <<endl;
//	return 0;
//}



//输出最小值 
//#include <iostream>
//using namespace std;
//int main()
//{
//	int a,b,c;
//	int f(int x,int y,int z);
//	cin >>a >>b >>c;
//	c=f(a,b,c);
//	cout <<c <<endl;
//	return 0;
//}
//
//int f(int x,int y,int z)
//{
//	int m;
//	if(x<y) m=x;
//	else m=y;
//	if(z<m) m=z;
//	return(m); 
//}


//#include <iostream>
//using namespace std;
//int main()
//{
//	int a,b,c;
//	c=a+b;
//	cout <<"a+b="<<a+b;	
//}


//#include <iostream>
//using namespace std;
//int add(int x,int y);
//int main()
//{
//	int a,b,c;
//	c=add(a,b);
//	cout <<"a+b="<<c<<endl;
//	return 0;
//}
//
//int add(int x,int y)
//{
//	int z;
//	z=x+y;
//	return(z);
//}


//#include <iostream>
//using namespace std;
//int main()
//{
//	void sort(int x,int y,int z);
//	int x,y,z;
//	cin>>x>>y>>z;
//	sort(x,y,z);
//	return 0;
//}
//
//void sort(int x,int y,int z)
//{
//	int temp;
//	if(x>y){temp=x;x=y;y=temp;}
//	if(z<x) cout <<z<<','<<x<<','<<y<<endl;
//	else if (z<y) cout<<x<<','<<z<<','<<y<<endl;
//		 else cout<<x<<','<<y<<','<<z<<endl;
//}

猜你喜欢

转载自blog.csdn.net/qq_48167493/article/details/120516194
今日推荐