write an algorithm to create a calculator two input operand and an operator in C++
Answers
Answered by
1
Answer:
#include <iostream>
class MyIO
{
int a, b;
public:
Input()
{
std::cin>>a>>b;
}
Display()
{
std::cout<<"A: "a<<", B: "<<b<<std::endl;
std::cout<<"A + B: "<<a + b<<std::endl;
}
};
int main()
{
//usage
MyIO example;
example.Input();
example.Output();
return 0;
Explanation:
Similar questions