這是我的code
#include<iostream>
using namespace std;
int main()
{
int a;
char b;
double c;
while(1)
{
double s1=0,s2=0;
do
{
cin>>a>>b>>c;
(a%2==0)?s1+=c:s2+=c;
}while(cin.peek()!='\n');
cout<<s2-s1<<endl;
}
}