simple compound assignment program in C++ (C Plus Plus).

simple compound assignment program in C++ (C Plus Plus).

  1. 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;
}

 

simple compound assignmentOutput:

Figure: simple compound assignment

Prof.Fazal Rehman Shamil (Available for Professional Discussions)
1. Message on Facebook page for discussions,
2. Video lectures on Youtube
3. Email is only for Advertisement/business enquiries.