为什么不对呀????

ljy2022 2022-07-10 18:49:12 8

#include<bits/stdc++.h> using namespace std; int main(){ ios::sync_with_stdio(false); int a,x,y; cin>>a>>x>>y; for(int i=1;i<=a;i++) cout<<"("<<x<<","<<i<<") "; cout<<endl; for(int i=1;i<=a;i++) cout<<"("<<i<<","<<y<<") "; cout<<endl; int m=x+y; int n=y-x; for(int i=1;i<=a;i++){ if(i<=a&&i+n<=a) cout<<"("<<i<<","<<i+n<<") "; else break; } cout<<endl; for(int i=1;i<=a;i++) cout<<"("<<m-i<<","<<i<<") "; return 0; }

{{ vote && vote.total.up }}

共 2 条回复

HJC 黑铁V

你i定义错了

ljy2022

555