efficient way for addition c code example
Example 1: how to use addition in c
#include <stdio.h>
int main() {
int number1, number2, sum;
printf("Enter two integers: ");
scanf("%d %d", &number1, &number2);
sum = number1 + number2;
printf("%d + %d = %d", number1, number2, sum);
return 0;
}
Example 2: addition in c
#include <stdio.h>
int main(){
int a, b, sum;
printf("Enter the first number: \n");
scanf("%d", &a);
printf("Enter the second number: \n");
scanf("%d", &b);
sum = a + b;
printf("Sum is %d", sum);
}