#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
double z;
double a;
double q;
double x;
cin>> z;
cin>> a;
cin>> q;
cin>> x;
cout<<z+a<<"\n";
cout<<q+x<<"\n";
return 0;
}
-----------------------------------------------------
測試: OK
解題:不OK
#include
using namespace std;
int main(int argc, char *argv[])
{
double z;
double a;
double q;
double x;
cin>> z;
cin>> a;
cin>> q;
cin>> x;
cout<<z+a<<"\n";
cout<<q+x<<"\n";
return 0;
}
-----------------------------------------------------
測試: OK
解題:不OK
應該用迴圈喔 你這樣只能測兩次