Write a program add two number

 Write a program add two number in c.

Write a program add two number


//Add two number.

#include<stdio.h>
#include<conio.h>
void main()
{
    int a,b,sum;
    printf("\n Enter First Number=");
    scanf("%d",&a);
    printf("\n  Enter Second Number=");
    scanf("%d",&b);
    sum=a+b;
    printf("\n Sum=%d",sum);
    //Second method
    printf("\n Sum=%d+%d=%d",a,b,a+b);
    getch();
}




Post a Comment

0 Comments