***すれ立てるまでもない質問はここで 第3刷***
レス数が900を超えています。1000を超えると表示できなくなるよ。
0910デフォルトの名無しさん
NGNGでた宿題が理解できません
これを完成させ 桁数がでかい数の足し算をさせろというのですが。。。
Stringを使うらしいんですか 理解不能です
宜しければ ヒントをお願いします
#include <iostream>
#include <string>
#include <cmath>
#include <cctype>
using namespace std;
typedef struct bignum
{
int len;
short * val;
} * bignump;
<return type> getvalue (<parameters>);
<return type> addvalues (<parameters>);
<return type> printvalue (<parameters>);
void main ()
{
bignum val1,sum;
bignump val2 = new bignum;
cout << "Enter first value: ";
val1 = getvalue();
cout << "Enter second value: ";
*val2 = getvalue();
sum = addvalues(val1, *val2);
cout << "The sum of the values you entered\n\t";
printvalue(val1);
cout << "\nand\n\t";
printvalue(*val2);
cout << "\nis\n\t";
printvalue(sum);
cout << endl;
delete [] val1.val;
delete [] val2->val;
delete val2;
delete [] sum.val;
}
レス数が900を超えています。1000を超えると表示できなくなるよ。