A PHP Error was encountered

Severity: 8192

Message: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated

Filename: libraries/Filtered_db.php

Line Number: 23

C++ Program To perform All Arithmetic Operations Using Functions
Q:

C++ Program To perform All Arithmetic Operations Using Functions

0

Logic :- 

You need to enter two number and pass in All function . If you get any problem then Comment

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

#include<iostream>
using namespace std;

int sum(int,int);
int sub(int,int);
int mul(int,int);
int div(int,int);
int rem;

int main()
{
 int a,b,m,su,s,d;

 cout<<"Enter Two Numbers : \n";
 cin>>a>>b;

 s=sum(a,b);
 su=sub(a,b);
 m=mul(a,b);
 d=div(a,b);

 cout<<"\nSum : = "<<s<<"\nSubtraction : = "<<su<<endl;
 cout<<"\nMultiplication : = "<<m<<"\n Division : = "<<d<<endl;
 return 0;
}

int sum(int a,int b)
{
 rem=a+b;
 return(rem);
}

int sub(int a,int b)
{
 rem=a-b;
return(rem);
}

int mul(int a,int b)
{
 rem=a*b;
return(rem);
}

int div(int a,int b)
{
 rem=a/b;
return(rem);
}

 

Output:

Enter Two Numbers :

sum := 1010

subtraction :=990

Multiplication := 10000

Division :=100

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now