You are here:   HomeC++ ProgrammingObject-oriented (OOP)Constants - Type of Constants in C++
by Dinesh Thakur Category: Object-oriented programming (OOP)

 

#include<iostream.h>
#include<conio.h>
void main()
{
            int a,b,c,d,e,f,g;
            clrscr();
            cout<<"\n Enter First Number a : ";
            cin>>a;
            cout<<"\n Enter Second Number b : ";
            cin>>b;
            c=a+b;
            d=a-b;
            e=a*b;
            f=a/b;
            g=a%b;
            cout<<" Addition = "<<c<<"\n";
            cout<<" Subtraction = "<<d<<"\n";
            cout<<" Multiplication = "<<e<<"\n";
            cout<<" Division = "<<f<<"\n";
            cout<<" Modulus = "<<g<<"\n";
            getch();
}

Arithmetic Operators



About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular Computer Notes blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to contact us.



What's New and Popular





Popular Article