Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
3Activity
0 of .
Results for:
No results containing your search query
P. 1
Function Add Sub Mul Div

Function Add Sub Mul Div

Ratings: (0)|Views: 190|Likes:

More info:

Published by: Muhammad Rana Farhan on Sep 20, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

10/19/2012

pdf

text

original

 
-------------------------------------------------------------------------------------------------------------------------------
Problem:
Function that perform basic arithmetic operationi.e.Addition, Subtraction,Multiplication and Division.-------------------------------------------------------------------------------------------------------------------------------#include <conio.h>#include <stdio.h>void add(int,int);void sub(int,int);void mul(int,int);void div(int,int);void main(){clrscr();int n1,n2;printf("Enter the 1st no: ");scanf("%d",&n1);printf("\nEnter the 2nd no: ");scanf("%d",&n2);add(n1,n2);sub(n1,n2);mul(n1,n2);div(n1,n2);getch();}void add(int n1, int n2){printf("\n%d + %d = %d",n1,n2,n1+n2);}void sub(int n1, int n2){printf("\n%d -%d = %d",n1,n2,n1-n2);}void mul(int n1, int n2){printf("\n%d * %d = %d",n1,n2,n1*n2);}

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->