Hey guys...Im trying to declare z to either times multiply add subtract or devide. I take 2 numbers from the user at the beggining right...and then i ask them weather they wanna subtract (S) multiply (M) devide (D) or add (A) and watever they type in...the 2 numbers will do..heres the switch code:
int z = x*y;
cout<<"Your numbers multiplied are:"<<z <<endl;
cout<<"Your numbers devided are:"<<z <<endl;
cout<<"Your numbers subtracted are:"<<z <<endl;
cout<<"Your numbers added are:"<<z <<endl;
cout<<"Sorry, You've entered an invalid character. Please retry!"<<endl;
where it sais <<z is where its gonna do watever method to the 2 numbers x and y. Where do i declare z each new time? how do i declare it?