#include #include using namespace std; main () int a, b, c, d, e, sum1=1, sum2=2; cout <<"Assignment operator program"<>a; cout <<"enter second integer, b:"; cin >> b; cout <<"enter thrid integer, c:"; cin >> c; b-=a*c; a /= c; sum1 += a %b+ 7*; cout << "\nthe sum1 is" <« sum1 « endl; system("pause"); cout <<"\nenter forth integer, d:"; cin >> d; cout <<"enter fifth integer, e:"; cin >> e; sum2 -= e*2+ d; cout << "\nthe sum2 is" << sum2 << endl; d = b* 2; e =a+1; cout « "\nValue a =" <
Arithmetic Operator
#include <iostream>
#include <stdlib.h>
using namespace std;
main ()
{
int a, b, c, d, e, sum1=1, sum2=2;
cout <<"Assignment operator program"<<endl;
cout <<"\nenter first integer, a:";
cin >>a;
cout <<"enter second integer, b:";
cin >> b;
cout <<"enter thrid integer, c:";
cin >> c;
b -= a * c;
a /= c;
sum1 += a % b + 7 * c;
cout << "\nthe sum1 is" << sum1 << endl;
system("pause");
cout <<"\nenter forth integer, d:";
cin >> d;
cout <<"enter fifth integer, e:";
cin >> e;
sum2 -= e * 2 + d;
cout << "\nthe sum2 is" << sum2 << endl;
d = b * 2;
e = a + 1;
cout << "\nValue a =" <<a;
cout << "\nValue b =" <<b;
cout << "\nValue c =" <<c;
cout << "\nValue d =" <<d;
cout << "\nValue e =" <<e<<endl;
return 0;
}
4.5) Can you predict what is the output will be before run the code?


Step by step
Solved in 4 steps with 1 images









