Write A C++ Program For Shorthand Assignment Operator


#include<iostream.h>
#include<conio.h>
void main()
{
 int a,b,c;
 clrscr();
 cout<<"Enter Value For a,b,c "<<endl;
 cin>>a>>b>>c;
 a += b*c+a;   // Shorthand assignment operator is used here.
 cout<<"a = "<<a;
 getch();
}

Output

Enter Value For a,b,c
10
20
30
a = 620