simple compound assignment program in C++ (C Plus Plus).
- simple compound assignment program in C++ (C Plus Plus).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
// 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