C Program to find sum of two numbers
###### Posted by Samath
Last Updated: January 02, 2017

Write a C program that ask the user to enter two integers. Then, the sum of those two integers is stored in a variable and displayed on the screen.

Code:

```#include<stdio.h>

int main() {
int num1, num2, sum;

printf("\nEnter two no: ");
scanf("%d %d", &num1, &num2);

sum = num1 + num2;

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

return(0);
}```

###### Sum of two values in C
Samath | Nov 09, 2014
###### C++ Calculate the sum from 1 to 100
Samath | Jan 05, 2017
###### Write a C++ program that find the sum of all even numbers between 1 and 30 excluding 6, 8, 24 and 28
Samath | Nov 02, 2014
###### Sum of the first 30 squares in C
Samath | Dec 21, 2014
###### Java program that uses a loop to compute the sum of all odd digits of an input. (For example, if the input is 32677, the sum would be 3 + 7 + 7 = 17.)
Samath | Apr 03, 2022
###### Recursive function that find the sum of digits in a integer using C++
Samath | Dec 24, 2014
###### C Program to calculate sum of 5 subjects, calculate percentage and grade
Samath | Jan 02, 2017
###### C program to find sum of elements of the array
Samath | Jan 02, 2017
###### Java program that prints the sum of the first ten positive integers
Samath | Jan 08, 2021
###### Java program that uses a loop to compute the sum of all even numbers between 2 and 100 (inclusive)
Samath | Apr 03, 2022
###### C program that prompts the user for a positive integer and then computes the sum of all the digits of the number
Samath | May 04, 2016
###### C Program to Compute sum of the array elements using pointers
Samath | Jan 02, 2017
###### Java program that uses a loop to compute the sum of all squares between 1 and 100 (inclusive)
Samath | Apr 03, 2022
###### Java program that uses a loop to compute the sum of all even numbers between a and b (inclusive), where a and b are inputs
Samath | Apr 03, 2022