All of us started from being a rookie, and I'm one of those rookies who are new in this course. Maybe its time for you
to share your expertise unto the newbies? Hope anyone might help me willingly in my program.Here's the problem:
Use Pointers and Functions:
Ask a user wether (+), (-), (*), or (/) is to be executed, After choosing the operation, ask the user how many
operands will it use. Display the correct corresponding output.
Example: Chose an Operation: *
Number of Operands: 3
Enter 1st Operand: 2
Enter 2nd Operand: 1
Enter 3rd Operand: 3
The Product is 6.
My code (Haven't got it yet):
#include <iostream>
#include <conio.h>
using namespace std;
void addition (int *b)
{
int operands, c;
cout << "Number of Operands: ";
cin >> operands;
for ( int i = 0; i < operands; i++)
{
cout << "Enter " << i+1 << " Operand: ";
cin >> *b;
*b = *b + *b;
}
}