Write a program which take two values and print their sum in C .



#include<stdio.h>

#include<conio.h> //predefine function

void main()//main funtion

{

    int n1,n2,sum;

    printf("Enter the 1st Number = ");

    scanf("%d",&n1);

    printf("Enter the 2nd Number = ");

    scanf("%d",&n2);

    sum=n1+n2;

    printf("Sum of two number = %d",sum);

getch();

}

OUTPUT :- 

Previous Post
Next Post