Can Someone help please? BigNumber class Implement a BigNumber class that stores
ID: 3740419 • Letter: C
Question
Can Someone help please?
BigNumber class
Implement a BigNumber class that stores nonnegative integers with up to 1000 digits. The digits will be stored as array elements in reverse order, e.g. 234 is stored with 4 stored in location zero, 3 stored in location 1 and 2 stored in location 2 . This approach is required, not optional.
You will implement the BigNumber.cpp file to go with the BigNumber.h below. You'll also want to implement a driver.cpp to test all member functions. For example ...
BigNumber n(234);
cout << n << endl; (etc.)
Explanation / Answer
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int arr[1000], size, i, j, temp;
cout<<"Enter array size : ";
cin>>size;
cout<<"Enter array elements : ";
for(i=size; i>=0; i--)
{
cin>>arr[i];
}
cout<<"Now the Reverse of the Array is : ";
for(i=0; i<size; i++)
{
cout<<arr[i]<<" ";
}
getch();
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.