程序1:
// 123.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
cout<<"班级:自动化1124班\n";
cout<<"姓名:罗梓通\n";
cout<<"学号:201211632\n";
return 0;
}
程序2:
// 123456.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
using namespace std;
int max(int x, int y )
{
int t;
if(x>y)
t=x;
else
t=y;
return t;
}
int main()
{
int number1,number2;
cout<<"请输入两个字:";
cin>>number1>>number2;
int maxValue=max(number1,number2);
cout<<"最大值="<<maxValue<<endl;
return 0;
}