为什么会多出一个换行??
查看原帖
为什么会多出一个换行??
1478648
luoguofwangliming楼主2024/11/7 17:55
#include<bits/stdc++.h>
using namespace std;
int main()
{
	int a,b=1,c,d,e;
	cin>>a;
	e=a;
	while(c!=a)
	{
		while(d!=e)
		{
			
			if(b<10)
		    {
		    	cout<<0<<b;
			}
			else
			{
				cout<<b;
			}
			d++;
			b++;
		}
		e--;
		c++;
		d=0;
		cout<<endl;
	}
	if(b<10)
	{
	    cout<<0<<b;
	}
	else
	{
		cout<<b;
	}
	return 0;
}
2024/11/7 17:55
加载中...