how can i add maximum numbers to calculate ?
and i have problem in % .. how can i make "enter the second number " disappear in % operation ? :v
this is my cal :
#include <iostream>
#include <math.h>
using namespace std;
int main()
{
double num, den, result;
char op;
do {
cout <<"\nCalculator - Enter Number: ";
cin >> num;
cout << "Enter operator : +,-,*,/,^,% : ";
cin >> op;
cout << "enter second number: " ;
cin >> den;
if (op=='+') result=num+den;
if (op=='-') result=num-den;
if (op=='*') result=num*den;
if (op=='/') result=num/den;
if (op=='^') result=pow(num,den);
if (op=='%') result=num/100;
The answer to the question is available in the PDF file https://www.assignmentexpert.com/https://www.assignmentexpert.com/homework-answers/programming-answer-38105.pdf
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment