Create an array of 5 objects of
calculator. Use parameterized constructor to initialize the values. Display output of all four
arithmetic operations.
#include <iostream>
using namespace std;
int main()
{
char arr[5]={'+','-','*','/','%'};
for (int i=0; i<5; ++i)
cout << arr[i] << " ";
return 0;
}
Comments
Leave a comment