Instructions : Design a struct data type that will hold a positive numeric value containing up to 100 digits. Call this data type BigNum.
Teacher won't e-mail me back so im acking.
Does that mean 4234545352343445 <---contain 100 numbers
or 2 3 5 342 213 5 3 4323 <--containg 100 diff numbers?
Also does it matter if im reading the digits from a file or from the input screen?
here are the function protoytpes
[CODE]bool init (BigNum & value);
bool read (istream & ins, BigNum & value);
void write (ostream & outs, const BigNum & value);
bool equal (const BigNum & value1, const BigNum & value2);
void add (const BigNum & value1, const BigNum & value2, BigNum & sum);
CODE]
And here is a minimal test of the BigNum that the teacher gave us
Code:
#include "bignum.h"
int main ()
{
BigNum a, b, c;
init (a);
init (b);
init (c);
read (cin, a);
read (cin, b);
if (equal (a, b))
cout << "Values are equal\n";
else
cout << "Values are NOT equal\n";
write (cout, a);
cout << endl;
write (cout, b);
cout << endl;
add (a, b, c);
write (cout, c);
cout << endl;
return 0;
}