为什么错(来自蒟蒻的提问)
查看原帖
为什么错(来自蒟蒻的提问)
539712
123uuu楼主2023/11/1 12:49
#include<bits/stdc++.h>
using namespace std;
int a[10]={0};
int main(){
	int k,i,n;
	cin>>k;
	while(k>=0){
		a[n]=k%10;
		k/=10; 
		n++;
	} 
	for(i=n;i>=0;--i){
		if(a[i]!=0){
			cout<<a[i];
		}
	}
return 0;
} 
2023/11/1 12:49
加载中...