Program to add two numbers

0
34

 

#include<stdio.h>
#include<conio.h>
void main()
{

   int a,b,c;         /*declaring the variables*/
   clrscr();         
   printf(“enter two numbers\n”);
   scanf(“%d,%d”, &a,&b);   /*inputting the values from keyboard*/
   c=a+b;          /*adding the contents of a & b then storing the result in c */
   printf(“sum of %d and %d = %d”,a,b,c);
   getch();

}
    Output:
   enter two numbers
   10
   25
   sum of 10 and 25 = 35
program to add two numbers in c write a program to add two numbers write a program to add two numbers in c program to add two numbers in basic c program to add two numbers
Program to add two numbers.

LEAVE A REPLY

Please enter your comment!
Please enter your name here