#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 =" <

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

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?

#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*;
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 « "\nValued =" <<d;
cout << "\nValue e =" <ceccendl;
return 0;
Transcribed Image Text:#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*; 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 « "\nValued =" <<d; cout << "\nValue e =" <ceccendl; return 0;
Expert Solution
steps

Step by step

Solved in 4 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY