Skip to main content

Write a program to add two numbers and display the result Input format Inputs are two numbers in each line

 Write a program to add two numbers and display the result

Input format

Inputs are two numbers in each line

Output format

Print sum of two given numbers


Note: Printing unwanted or ill-formatted data to output will cause the test cases to fail

Sample testcases
Input 1
2
4

OUTPUT

#include<stdio.h>
#include<stdlib.h>
int main()
{
    int a=0;
    int b=0;
    scanf("%d",&a);
    scanf("%d",&b);
    printf("%d",a+b);
    return 0;
}

Comments

Popular posts from this blog

Raju is a Civil Engineer. He is writing software to automate his work. As a part of his requirement, he wants to calculate the circle diameter, circumference, and area. Help Raju to complete his task. Get radius as input.

OUTPUT

Seetha, a maths teacher has started to learn the C programming language. She writes a program to do basic arithmetic operations. Help Seetha to complete her first program.

OUTPUT