Using Operator C++


How to using operator + , - , * , / , % in C++ Language. This is simple source.

/*
Programmed by Rifki Yandhi
Program : Using operator
*/
#include <iostream>
#include <conio.h>
using namespace std;

int main()
{
int intA,intB,intC;
intA = 10;
intB = 3;
intC = 150;
cout<<"\nImplementation operators +,-,*,/,%"<<endl;

cout<<"\nA = "<<intA<<endl;
cout<<"B = "<<intB<<endl;

cout<<"\n(+) A + B = "<<(intA+intB)<<endl;
cout<<"(-) A - B = "<<(intA-intB)<<endl;
cout<<"(*) A * B = "<<(intA*intB)<<endl;
cout<<"(/) A / B = "<<(intA/intB)<<endl;
cout<<"(%) A % B = "<<(intA%intB)<<endl;

getch();
}



Free source code and program download

0 comments:

Post a Comment