Add Two Numbers

Lab C Beginner 10 points

Read two integers and print their sum.

Input

Two integers.

Output

The sum.

Example

Input

3 4

Output

7
Sample input available Sample output available
Editor
C

Hints

scanf needs the address of each variable: &a.

%d skips spaces and new lines before the number.

Solution explanation

&a gives scanf the memory location to store the value in.

Show solution
#include <stdio.h>

int main() {
    int a, b;
    scanf("%d %d", &a, &b);
    printf("%d\n", a + b);
    return 0;
}
Output
Answer
HOME LEARN COMMUNITY DASHBOARD