Cpp Program To Do Arithmetic Operations

  • Uploaded by: Saiyasodharan
  • 0
  • 0
  • April 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Cpp Program To Do Arithmetic Operations as PDF for free.

More details

  • Words: 124
  • Pages: 2
ARITHMETIC CALCULATIONS USING FUNCTIONS #include #include sint menu(); int add(int, int); int sub(int, int); int mul(int, int); float div(int, int); void main() { int a,b; cout<<"\n\n\t\tCalculator\n\n"; cout<<"\tEnter Number 1 : "; cin>>a; cout<<"\tEnter Number 2 : "; cin>>b; switch(menu()) { case 1: cout<<"Sum is "<>ch; return ch; }

int add(int a, int b) { return a+b; } int sub(int a, int b) { return a-b; } int mul(int a, int b) { return a*b; } float div(int a, int b) { return (float)a/b; } More useful programs @ http://www.gethugames.in/blog/

Related Documents

Cpp
May 2020 23
Cpp
December 2019 37
Cpp
June 2020 25

More Documents from ""