/*Program for adding two numbers*/
#include <stdio.h>
int main(){
int a, b, sum; //declare the variables that will be used, a will store the first number, b second number and sum, the sum.
printf("Enter the first number:
"); //Prompts user to enter the first number.
scanf("%d", &a);//Accepts input and saves it to variable a
printf("Enter the second number:
");
scanf("%d", &b);
sum = a + b; //Formular to add the two numbers.
printf("Sum is %d", sum);
}
#include<conio.h>
#include<stdio.h>
{
int a,b;
a=2;
b=10;
a=a+b;
printf("%d",&a);
getch();
}
int num1,num2;
printf("%d",num1+num2);
//addition of two numbers
int number1,number2;
puts("Enter two numbers");
scanf("%d%d",&number1,&number2);
printf("addition is :%d",number1+number2)
#include<stdio.h>
#include<conio.h>
#include<math.h>
int main()
{
int a,b,sum;
sum=a+b;
printf("
enter the first number %d:");
printf("
enter the second number %d:");
scanf("%d",&a,&b)
printf("%d",sum);
}
//test