simple compound assignment program in C++ (C Plus Plus).
- simple compound assignment program in C++ (C Plus Plus).
// Compound asssigment operator #include <iostream> using namespace std; int main() { int a,b,c,d; cout<<"Enter a value of c "; cin>>c; cout<<"Enter a value of d "; cin>>d; a=4; b=13; a*=c; b/=d; cout<<"Value of a ="<<a<<endl<<"Value of b ="<<b<<endl; }
Output:
Figure: simple compound assignment