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

Output:

simple compound assignment
Figure: simple compound assignment
Prof. Fazal Rehman Shamil
Researcher, Publisher of International Journal Of Software Technology & Science ISSN: 2616-5325
Instructor, SEO Expert, Web Programmer and poet.
Feel free to contact.