INSTRUCTION: Read and study the assignment below. Solve the problem using C++ programming language, compile, run and screen shot the correct output. Copy and paste the source code or program code and the required sample output (screen shot) in the format below. Write a program using RETURNING VALUES FROM FUNCTION that will display the sum, product, difference, quotient and modules of two numbers. Note: Create function name for sum, product, difference,quotient and modulus. Complete the program codes below to finished the problem requirements. SAMPLE OUTPUT: Enter first number: 7 Enter second number: 2 The sum is 9 The product is 14 The difference is 5 The quotient is 3 The modulus is 1 SOURCE CODE: Update the source code below   include using namespace std;  int addTwoNumbers(int , int);    // function name for sum                                                      // Create function name for product                                                      // Create function name for difference                                                      // Create function name for quotient                                                      // Create function name for modulus   int num1, num2, sum=0;   // global variable   main()   {  cout<<”Enter first number: “;      cin>> num1;      cout<<”Enter second number: “;      cin>> num2;      sum= addTwoNumbers(num1, num2);      cout<<"The sum is  "<< sum;           }//end of main   //Calling Function addTwoNumbers   int addTwoNumbers (int a, int b)   {   sum= a + b; return sum;                    // return value using RETURN keyword     }      OUTPUT: SCREENSHOT AND PASTE YOUR OUTPUT HERE

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

INSTRUCTION: Read and study the assignment below. Solve the problem using C++ programming language, compile, run and screen shot the correct output. Copy and paste the source code or program code and the required sample output (screen shot) in the format below.

Write a program using RETURNING VALUES FROM FUNCTION that will display the sum, product, difference, quotient and modules of two numbers.

Note: Create function name for sum, product, difference,quotient and modulus.

Complete the program codes below to finished the problem requirements.

SAMPLE OUTPUT:
Enter first number: 7
Enter second number: 2
The sum is 9
The product is 14
The difference is 5
The quotient is 3
The modulus is 1

SOURCE CODE: Update the source code below

 

include<iostream>
using namespace std;

 int addTwoNumbers(int , int);    // function name for sum

                                                     // Create function name for product

                                                     // Create function name for difference

                                                     // Create function name for quotient

                                                     // Create function name for modulus

  int num1, num2, sum=0;   // global variable

  main()
  {  cout<<”Enter first number: “;

     cin>> num1;

     cout<<”Enter second number: “;

     cin>> num2;

     sum= addTwoNumbers(num1, num2);
     cout<<"The sum is  "<< sum;

       <insert your codes here>


  }//end of main

 

//Calling Function addTwoNumbers

  int addTwoNumbers (int a, int b)
  {   sum= a + b;
return sum;                    // return value using RETURN keyword
    }   

 

OUTPUT: SCREENSHOT AND PASTE YOUR OUTPUT HERE

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
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