Run ID:124976

提交时间:2025-07-13 09:25:44

#include<iostream> #include<cstring> using namespace std; char a[100001],b[10001]; int main(){ //strcpy( , ) 将字符数组~复值给~ //strcat( , ) 字符数组拼接 //strcmp(a,b) a>b cout<<"1" a==b cout<<"0" a<b cout<<"-1"; /** cin>>a>>b; lena=strlen(a); ienb=strlen(b); if(lena>lenb){ cout<<a; }else{ if(lena<lenb){ cout<<b; }else{ int e=strcmp(a,b); if(e==1){ cout<<a; }else{ if(e==0){ cout<<"="; }else{ cout<<b; } } } }**/ long long n cin>>n; int max=0; if(n<0){ n= -1*n; } while(m>0){ if(max<n%10){ max=n%10; } n=n/10; } cout<<max; return 0; }