EZCAL - Sum and product
Dữ liệu vào: Standard input
Dữ liệu ra: Standard output
Giới hạn thời gian: 1.0 giây
Giới hạn bộ nhớ: 128 megabyte

Write a program using 2 function which accept two integers as an argument and return its sum and return its product. Call 2 function from main( ) and print the results in main( ).

Input:

- The first line contains  a single positive integer a 
- The second line contains  a single positive integer b

Output:

- The first line contains  a single positive integer S=a+b

- The second line contains  a single positive integer P=a*b

Ví dụ

  • input
    2 4
    output
    6
    8
Back to Top