Embercode
✕
C++ Variables and Data TypesCoding problems

C++ Variables and Data Types: coding problems

Write a program that reads the input and prints the answer. Run checks it against every test, including hidden ones.

0 of 8 solved

  • A corner shop keeps two running totals, one for cash and one for card payments. Both totals can be large, and either can be negative. Add them together.

    Use a type that holds values up to about 10 to the power 18. An int is too small for this.

    Input. One line with two integers `a` and `b`. Each is between -1000000000000000000 and 1000000000000000000.

    Output. One integer: `a + b`.

    Example 1 input

    3 4
    

    Output

    7
    

    Example 2 input

    -5 12
    

    Output

    7