Coders Packet

BigInt Container Class implemented in C++

By Koppula Bhanu Prakash Reddy

BigInt Class is used to store the positive and negative integers which are large-sized with many digits that cannot be stored in a long long int. The programming language used is C++.

The packet has 9 files out of which "main.cpp" is the only file necessary for running the program, the rest of the files are just terminal runtime screenshots that can be used for a better understanding of the code.

The BigInt class has three attributes "neg", "zero", and "SPLIT_BY".

The neg is a boolean value that is true if entered input is a negative integer else false.

The zero is a boolean value that is true if the input entered is valued as 0 else false.

The program contains BigInt class which takes a string as input and check whether it is a valid positive or negative integer or not and then splits the string by SPLIT_BY value, if SPLIT_BY = 10 then the string is split by 10 characters and converted to Integer and stored in BigInt class.

If 10 characters substring as "0000075601" then the node will have a value "nz = 5"  because there are 5 zeros in front of the most significant digit and the "value = 75601".

Download Complete Code


No comments yet