Sum of Two Integers code example
Example 1: addition of two numbers in c
int num1,num2;
printf("%d",num1+num2);
Example 2: sum of all n integers
Sum of n integers 1 + 2 + 3 + ... + n = n * (n + 1) / 2
int num1,num2;
printf("%d",num1+num2);
Sum of n integers 1 + 2 + 3 + ... + n = n * (n + 1) / 2