#33435: c++解


yp11052079@yphs.tp.edu.tw (909-08崔智媛)


c++
#include <stdio.h> #include <stdlib.h> int main() { int a,x=-1,i,c; scanf("%d",&a); for(i=0;i<a;i++) { scanf("%d",&c); if(c>x) { x=c; } } printf("%d",x); }
Close
CPP
#33459: Re: c++解


yp11052079@yphs.tp.edu.tw (909-08崔智媛)


更正

c++
#include <stdio.h> #include <stdlib.h> int main() { int a,x=-1,i,c; scanf("%d",&a); for(i=0;i<a;i++) { scanf("%d",&c); if(c>x) { x=c; } } printf("%d",x); }