#include<iostream.h> struct product{ unsigned long int id; char name[10]; int price; char where[10]; int year,month,day; }; void main() { float sum=0; product count[10]; cout<<"please input the information of production"<<endl; for(int i=0;i<10;i++) { cin>>count[i].id>>count[i].name>>count[i].price>>count[i].where>>count[i].year>>count[i].month>>count[i].day; } cout<<"产品的总价值为"<<endl; for(i=0;i<10;i++) { sum+=count[i].price; } cout<<sum<<endl; }