#include<iostream>
using namespace std;
int main()
{
int a,b,c,d,e,i,t;
cin>>t;
for(i=1;i<=t;i++)
{
cin>>a>>b>>c>>d;
if(d-c==c-b)
{
e=d+c-b; cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e<<endl;
}
else
{
e=d*c/b; cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e<<endl;
}
}
return 0;
}
int main()
{
int t,i,a,b,c,d,e;
cin>>t;
for(i=0;i<t;i++)
{
cin>>a>>b>>c>>d;
if(b-a==c-b)
{
e=d+(b-a);
cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e<<endl;
}
else
{
e=d*(b/a);
cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e<<endl;
}
}
system("pause");
return 0;
}
請問我的跟你的有甚麼不一樣?為甚麼我的不會過
int main()
{
int t,i,a,b,c,d,e;
cin>>t;
for(i=0;i<t;i++)
{
cin>>a>>b>>c>>d;
if(b-a==c-b)
{
e=d+(b-a);
cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e<<endl;
}
else
{
e=d*(b/a);
cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e<<endl;
}
}
system("pause");
return 0;
}
請問我的跟你的有甚麼不一樣?為甚麼我的不會過
c++沒有system指令
#include
using namespace std;
int main()
{
int a,b,c,d,e,i,t;
cin>>t;
for(i=1;i<=t;i++)
{
cin>>a>>b>>c>>d;
if(d-c==c-b)
{
e=d+c-b; cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e<<endl;
}
else
{
e=d*c/b; cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e<<endl;
}
}
return 0;
}
t和i有什麼意義嗎