CALL FOR HELP, CONSTRUCT A NEW INTEGER TYPE MEGA INTEGER 200

Updated on healthy 2024-05-10
11 answers
  1. Anonymous users2024-02-10

    The mega integer class provided by fengerzh is a start, but there are some details of it that landlords must pay attention to:

    1) There is no subtraction and division.

    2) Call the C resource management function that should not be called in C++: malloc( )realloc( ).

    3) Exploit a non-standard C++ data type: Microsoft C++'s int644) is actually just an int: mega integer( 2147483647 ) 1 will cause an overflow.

    There may be other areas for improvement. CONTINUE TO GET INVOLVED ...

  2. Anonymous users2024-02-09

    Any book called "The Programmer" will have an introduction to this program.

    In addition, if someone writes it, 200rmb is really about the same.

  3. Anonymous users2024-02-08

    The value of byte can range from -128 127 to the power of -2 to the power of -1

    The value of short can range from -32768 to 32767, which occupies 2 bytes (-2 to the 15th power of 2 to -1).

    The value of int ranges from (-2147483648 2147483647) and occupies 4 bytes (-2 to the 31st power of 2 to -1).

    The value of long ranges from (-9223372036854774808 9223372036854774807) and occupies 8 bytes (-2 to the 63rd power of 2 to -1 of 2).

    List features and common methods.

    A list is an ordered, repeatable container.

    Ordered means that each element in the list has an index mark. Elements can be accessed based on their index tag (their position in the list), giving them precise control.

    Repeatability refers to the fact that duplicate elements are allowed to be included in the list. More precisely, lists usually allow elements that satisfy to be added to the container repeatedly;

    In addition to the methods in the collection interface, list has some more methods related to order (index).

    void add (int index, object element)

    Inserts an element at the specified location, moving the previous element back one bit.

    object set (int index,object element)

    Modify the element at the specified location.

    object get (int index)

    Returns the element at the specified location.

    object remove (int index)

    Deletes the elements in the specified position, and all subsequent elements are moved forward by one bit.

    int indexof (object o)

    Returns the index of the first matching element. If there is no element, -1 is returned

    int lastindexof (object o)

    Returns the index of the last matching element. If there is no element, -1 is returned

    There are three commonly used implementation classes for the List API: ArrayList, LinkedList, and Vector.

    Example 1] List common methods.

    Running renderings:

    Common methods for index operations in test lists:

    After reading it, write it yourself and try it out, it will be very helpful for you to study.

  4. Anonymous users2024-02-07

    The value range of byte is -128 127, which occupies 1 byte (to the 7th power of du-2).

    zhi2 to the power of 7 -1).

    The DAO value of short is in the range of -32768 32767, which occupies 2 bytes (-2 to the 15th power of 2 to -1).

    The value of int ranges from (-2147483648 2147483647) and occupies 4 bytes (-2 to the 31st power of 2 to -1).

    The value of long ranges from (-9223372036854774808 9223372036854774807) and occupies 8 bytes (-2 to the 63rd power of 2 to -1 of 2).

  5. Anonymous users2024-02-06

    I'll keep a record of that too. Hehe.

  6. Anonymous users2024-02-05

    Numeric types have their own encapsulated classes, and they all have their own ranges, which are represented by the constant max value.

    The maximum specific value of the type.

    The maximum value of the type is represented by the constant value min value, for example: byte -

    short, int, long, float, double are all the same.

  7. Anonymous users2024-02-04

    byte (word.

    Self-joint) -128

    127short(short integer) -32768 32767int(integer) -2147483648 2147483647long(long integer) -9223372036854775808 9223372036854775807

  8. Anonymous users2024-02-03

    I remember seeing the practice of converting characters to char* and then bit manipulation. I can't remember the exact algorithm.

  9. Anonymous users2024-02-02

    I once wrote one, looking for it on the hard drive, interested.

  10. Anonymous users2024-02-01

    A is defined as a variant type.

    If integer had to be like this, dim a as integer, b as integer

  11. Anonymous users2024-01-31

    The answer is wrong, and it is correct that a is defined as an integer type variable.

Related questions
4 answers2024-05-10

Paper is often seen in daily life, although it is a very commonly used paper, but there are many types of it, the first is letterpress printing paper, this quantitative is about 50 to 80 grams per square, usually used to print books. Then there is newsprint, which is called white newspaper, and the amount is about 51 grams, which is mainly used in newspapers or periodicals. Jiaozhen shouts board printing paper, the quantity is about 60 to 180 grams, coated paper, this quantitative is about 90 to 250 grams, this kind of can not be folded, it is very troublesome to restore after a slight crease. >>>More

16 answers2024-05-10

I don't have the right to make you give up, but I think the most difficult thing for people is how to learn to give up, giving up is not a simple abandonment and escape, let alone an excuse for a negative life, giving up is a rational choice, a kind of cherishing, a kind of beauty, a deeper love. There is a saying that has not been said: sometimes the fate must be there, and the hit is not always forced. >>>More

19 answers2024-05-10

Hemangioma is a common benign tumor or vascular malformation, which is caused by vascular hyperplasia, commonly longer than soft tissues such as blood vessels and internal organs, and is also diverse, and there are many types of hemangioma, so in general, hemangioma is not dangerous, because the greatest possibility is the rupture of blood vessels leading to bleeding. If it is a capillary hemangioma or a disease that is not very serious, and there is no rupture and bleeding of the hemangioma in the important organs, it will not have a particularly big impact on the human body, and the positive ** can control the bleeding. If it is an abdominal aortic hemangioma or an aortic dissection hemangioma, once it ruptures and bleeds, hemorrhagic shock will occur in a short period of time, which can be life-threatening. >>>More

7 answers2024-05-10

The types of volcanic eruptions are divided into two categories: fractured eruptions and central eruptions according to the channels of magma. >>>More

4 answers2024-05-10

Summary. Hello, the manifestations and characteristics of the new ** 1Entertainment Entertainment is not only the characteristics of the new era, but also the content characteristics of the new world. >>>More