Add 2 integers


Submit solution

Points: 20 (partial)
Time limit: 17.0s
Memory limit: 64M

Author:
Problem type
Allowed languages
C

TASK

Create a simple program in C to get 2 integers from the user and print the sum of the integers.

Input Format:

Two single lines containing the user input integer

Output Format:

A single line containing the user output integer

Sample Input

10

20

Sample Output:

30


Comments


  • 0
    KabilanMohan  commented on March 14, 2023, 3:12 p.m.

    include <stdio.h>

    int main () { int a,b,c; scanf("%d",&a); scanf("%d",&b); c = a+b; printf ("%d", c);

    return 0; }


  • 0
    tharack2218  commented on Oct. 25, 2022, 11:38 p.m.

    class MyClass { // The class public: // Access specifier MyClass() { // Constructor cout << "Hello World!"; } };

    int main() { MyClass myObj; // Create an object of MyClass (this will call the constructor) return 0; }


  • 0
    cbenu4ece20064  commented on May 28, 2021, 2:24 p.m.

    10 20