c program perform addition(sum) of two numbers

#include<stdio.h>//standard input output header file
void main()
{
	int n1,n2,ans;
	printf("\n Enter first number=>");
	scanf("%d",&n1);
	
	printf("\n Enter second number=>");
	scanf("%d",&n2);
	ans=n1+n2;
	printf("\n Sum of %d and %d is %d",n1,n2,ans);
}

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *