Add 2 integers
Submit solution
C
Points:
20 (partial)
Time limit:
17.0s
Memory limit:
64M
Author:
Problem type
Allowed languages
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
include <stdio.h>
int main () { int a,b,c; scanf("%d",&a); scanf("%d",&b); c = a+b; printf ("%d", c);
return 0; }
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; }
10 20