forked from newde/homework
镇乃天子
我是无惨
This commit is contained in:
14
666/03.cpp
Normal file
14
666/03.cpp
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
#include<iostream>
|
||||||
|
using namespace std;
|
||||||
|
int jia(int i,int j){
|
||||||
|
int n;
|
||||||
|
i+j=n
|
||||||
|
return n;
|
||||||
|
}
|
||||||
|
int main(){
|
||||||
|
int n,a,b;
|
||||||
|
cin>>a>>b;
|
||||||
|
cout<<n<<endl;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
22
666/dog.cpp
Normal file
22
666/dog.cpp
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
#include<iostream>
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
void myswap(int &i,int &j){
|
||||||
|
int x;
|
||||||
|
x=i;
|
||||||
|
i=j;
|
||||||
|
j=x;
|
||||||
|
}
|
||||||
|
|
||||||
|
int main(){
|
||||||
|
|
||||||
|
int a,b,c;
|
||||||
|
|
||||||
|
cin>>a>>b;
|
||||||
|
|
||||||
|
myswap(a,b);
|
||||||
|
|
||||||
|
cout<<a<<" "<<b<<endl;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
20
666/pig.cpp
Normal file
20
666/pig.cpp
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
#include<iostream>
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
int mypai(int arr[],int b) {
|
||||||
|
int max=arr[0];
|
||||||
|
for(int j=1;j<5;j++)
|
||||||
|
if(max < arr[j])
|
||||||
|
|
||||||
|
max=arr[j];
|
||||||
|
|
||||||
|
return max;
|
||||||
|
}
|
||||||
|
|
||||||
|
int main(){
|
||||||
|
|
||||||
|
int a[5]={110,2,13,22,4};
|
||||||
|
int max=mypai(a,5);
|
||||||
|
cout<< max << endl;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
18
666/zhu.cpp
Normal file
18
666/zhu.cpp
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
#include<iostream>
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
int myadd(int x,int y);
|
||||||
|
|
||||||
|
|
||||||
|
int main(){
|
||||||
|
|
||||||
|
int a,b,c;
|
||||||
|
cin>>a >>b;
|
||||||
|
c=myadd(a,b);
|
||||||
|
cout << c << endl;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user