Answers for "add 2 numbers in c"

C
2

how to use addition in c

#include <stdio.h>
int main() {    

    int number1, number2, sum;
    
    printf("Enter two integers: ");
    scanf("%d %d", &number1, &number2);

    // calculating sum
    sum = number1 + number2;      
    
    printf("%d + %d = %d", number1, number2, sum);
    return 0;
}
Posted by: Guest on November-09-2020
3

c code to add two numbers

int n,m;
printf("%d",n+m);
Posted by: Guest on March-31-2021
1

how to add two numbers in c

#include <stdio.h>
int main() {    
	int sum_tot = 0;
    int num_1, num_2;    
    printf("Please, Enter First integer: ");
    scanf("%d", &num_1);
    printf("\nNow Please, Enter Second integer: ");
    scanf("%d", &num_2);

    sum_tot = num_1 + num_2;      
    
    printf("\n%d + %d = %d", num_1, num_2, sum_tot);
    return 0;
}
Posted by: Guest on July-24-2021
4

addition of two numbers in c

int num1,num2;
printf("%d",num1+num2);
Posted by: Guest on July-30-2020
0

add 2 numbers in c

#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);
Posted by: Guest on December-22-2020

Code answers related to "C"

Browse Popular Code Answers by Language