how i will make calculator that lets the user to make a lot of calculations i have problem with the numbers of variables

closed account (DL8X92yv)
Write your question here.

[code]
Put the code you need he#include <iostream>
using namespace std;
int main ()
{
for (double z=0;double z=3;){
double x,y,z;
char l;
cin>>x>>l>>y;
switch (l)
{
case '+':z=x+y;break;
case '-':z=x-y;break;
case '*':z=x*y;break;
case '/':z=x/y;break;
default:
cout<<"erorr";
}
cout<<z;break;
}

return 0;
}
while loop
Topic archived. No new replies allowed.