1int Count (int First,int second,CharThird)2{3Switch(third)4{5Case‘+‘:6Return (first+second);7Case‘-‘:8Return (first-second);9Case‘*‘:10Return (first*second);11Case‘/‘:12Return (first/second);13Default:14Return0;15}1617}1819int userusing (Linknode &L20{21stint right=0;22IntRecordLinknode p=l->Next24while (P! =NULL)25{cout<<"Please enter the result of the calculation:";cout<<p->num1<<p->ope<<p->num2<<"=";Cin>>Record29if (Record==count (p->num1,p->num2,p->Ope))right++;P=p->Next32}33ReturnRight34}35void Show (int Zongtishu,IntZhengque)36{Panax Notoginseng cout<<"Congratulations on your answer."<<zhengque<<" title <<ENDL; 38 if (zongtishu-zhengque!=< Span style= "color: #800080;" >0) 39 {40 Cout<< " But unfortunately you answered the wrong " << (Zongtishu-zhengque) <<< Span style= "color: #800000;" > " topic <<ENDL; 41 } 42}
Software Engineering Second Job