Computer Science, asked by kksahani12sep, 10 months ago

write a c program to add two numbers​

Answers

Answered by Shinchanboy03
2

Answer:

Program : C Program to find sum of two numbers

#include<stdio.h>

int main() {

int a, b, sum;

printf("\nEnter two no: ");

scanf("%d %d", &a, &b);

sum = a + b;

printf("Sum : %d", sum);

return(0);

mark as brilliant answer

Answered by SerenaBochenek
2

The program to add two numbers is given below.

Explanation:

//essential headers

#include<stdio.h>

#include<conio.h>

//main function

int main()

{

   //initialising the variables

   int a = 19, b = 12;

   //storing the sum of two numbers

   int c = a + b;

   //displaying the sum on console screen

   printf("The sum of two numbers is: %d",c);

   //return statement

   return 0;

}

Approach: -

Step 1: Importing the header files.

Step 2: Declaring the main function.

Step 3: Initialising the variables a and b with some values.

Step 4: Storing the sum of a and b in the variable c.

Step 5: Displaying the sum of two numbers.

Step 6: Return statement.

Learn more:

WAP to print addition of two number​...

https://brainly.in/question/10254988

Similar questions