软件编程的真正问题

#包含?& ltstdio.h & gt

int?主()

{?int?x,I,a1[6]={0},s 1 = 0;

浮动?a2[6]={0,5.8,6.5,3.9,9.8,7.5},S2 = 0;

夏尔?c;

while(1)

{scanf("%d%c ",& ampx & amp;c);

if(x & lt;=0)断开;

a 1[x]++;

}

printf(" Commodity \ tSales \ tSales \ n ");

for(I = 1;我& lt6;i++)

{ printf(" commodity % d \ t % d \ t % . 2f \ n ",I,A1 [I],a 1[I]* A2[I]);

s 1+= a 1[I];

S2+= a 1[I]* a2[I];

}

Printf ("Total \t%d\t%.2f\n ",s1,S2);

回归?0;

}