forked from newde/homework
镇乃天子
This commit is contained in:
18
260314/最大值指针.cpp
Normal file
18
260314/最大值指针.cpp
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
#include<iostream>
|
||||||
|
using namespace std;
|
||||||
|
int main(){
|
||||||
|
int a[10]={1,200,315,4,5,6,71,8,9,10};
|
||||||
|
int *b=a;
|
||||||
|
|
||||||
|
for(int i=1;i<10;i++)
|
||||||
|
if(*b<a[i])
|
||||||
|
*b=a[i];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
cout<<*b<<endl;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user