1
0
forked from newde/homework

镇乃天子

This commit is contained in:
2026-03-07 05:16:06 -05:00
parent 7aecf0da37
commit 9fdfe16b58
5 changed files with 85 additions and 0 deletions

24
666/最大值2.cpp Normal file
View File

@@ -0,0 +1,24 @@
#include<iostream>
using namespace std;
int main(){
int a[5]={87,99,3,12,1};
int max=a[0];
int * ptr_x;
ptr_x=a;
for(int i=1;i<5;i++){
if(*ptr_x > max){
max = *ptr_x;
}
ptr_x++;
cout<<ptr_x<<endl;
}
cout<<max<<" ";
return 0;
}