#include <cstdlib>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
int s,t,a,b,c,d;
while(cin>>s)
{
cin>>a>>b>>c>>d;
if(a/b==c/d)
{
for(t=1;t<s;t++)
{
cout<< a <<" "<< b <<" "<< c <<" "<< d <<" "<< d*2 <<endl;
}
}
else
cout<< a <<" "<< b <<" "<< c <<" "<< d <<" "<< b+1 <<endl;
}
return EXIT_SUCCESS;
}
這是我的程式~~
各位大大幫我看看錯在哪裡吧~~~~~~
#include
#include
using namespace std;
int main(int argc, char *argv[])
{
int s,t,a,b,c,d;
while(cin>>s)
{
cin>>a>>b>>c>>d;
if(a/b==c/d)
{
for(t=1;t {
cout<< a <<" "<< b <<" "<< c <<" "<< d <<" "<< d*2 < }
}
else
cout<< a <<" "<< b <<" "<< c <<" "<< d <<" "<< d+1 < }
return EXIT_SUCCESS;
}
這是我的程式~~
各位大大幫我看看錯在哪裡吧~~~~~~
有小錯誤
還是請各位大大幫忙吧~~