// Hello, I'm trying to develop a calculator because I think it would be the best program-type to learn and expanding programming skills. I am able to compile a workable console-calculator that reads the source once then exits. I don't want this, so,, I am trying to add a do-while loop to this application.
my-self developed theory (as-if all of these are supposed to work) is a do-while loop is like making an egg with two shells. lets call these shells the main-shell and the switch-shell because this is how I'm trying to apply this loop. My sources looks something like
int main()
{
cout<< "Press + , -. * or /"<<endl;
cout<< "Press Q to quit"<<endl;
cin>> (ch);
do if (ch!= 'q')
switch (ch)
{
case 'all possible !q's':
cout<<"enter numbers"<endl;
cin>>num_a>>num_b;
result= num_a () num_b;
cout<<result;
break;
}
while (ch=='q')
return 0;
}
If someone can expond on my understanding I will appreciate it and if i solve my problem I'll post Thanks in advance.
Newb1001