死循环???
查看原帖
死循环???
789231
huyike_2012楼主2024/9/23 16:29

十万火急

#include<bits/stdc++.h>
using namespace std;
int main()
{
	long long n;
	cin >> n;
	for (int i = 1; i <= n; i++)
	{
		for (int c = 1; c <= n; i++)
		{
			if (i == c || i + c == n + 1)
			{
				cout << '+';
			}
			else
			{
				cout << '-';
			}
			cout << endl;
		}
	}
	return 0;
}
2024/9/23 16:29
加载中...