Full width home advertisement

HTML

Tech News

Ad

Write a c program for summation,substraction,multiplicaction,division of two numbers using arithmetic operator 



#include<stdio.h>
#include<conio.h>

void main()
  {
	int n1,n2,ans;
	clrscr();
	printf("Enter Two numbers");
	scanf("%d%d",&n1,&n2);
	ans=n1+n2;
	printf("\nSummation of Two numbers is %d",ans);
	ans=n1-n2;
	printf("\nsubsctraction of two numbers is %d",ans);
	ans=n1*n2;
	printf("\nMultiplicaction of two numbers is %d",ans);
	ans=n1/n2;
	printf("\ndivision of two numbers is% d",ans);

	getch();
  }

Thank you for your time Seeya again

No comments:

Post a Comment

Bottom Ad [Post Page]