Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 4 The post office needs a program that reads in postal address data and then displays the data in a neat format. Declare four

Question 4 The post office needs a program that reads in postal address data and then displays the data in a neat format. Declare four string variables name, addr1, addr2 and postalCode. First, the main function of the program must input the data by means of a function called inputData. Second, the main function calls the function displayData to display the name and address as follows: Mr R.S. Bopape P.O. Box 50741 Sandton 2146 Submit the program and the output.
[05/12,1:39 am] My no.2: Draw a series of variable diagrams for the program below. Use the conventions of the Study Guide. 1// variable diagrams revisited 2 #include 3 using namespace std; 4 const int C =200; 5 int func1(int n, int n1)6{7 n +=3; 8 n1-= n; 9 return 2+ n + n1*C; 10}11 void func2(int n, int & n1)12{13 n = C * n1; 14 n1= n n1; 15}16 void func3(int & n, int & n1)17{18 int k; 19 k = n1+3; 20 n = k *30; 21 n1= n +2* k; 22}23 int main()24{25 int n, m, j; 26 n =5; 27 m =10; 28 j = func1(n, m); 29 n =15; 30 m =20; 31 func2(n, m); 32 n =25; 33 m =30; 34 func3(n, m); 3536 return 0; 37}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Fundamentals Study Guide

Authors: Dr. Sergio Pisano

1st Edition

B09K1WW84J, 979-8985115307

More Books

Students also viewed these Databases questions

Question

Describe the uses of information gained from job analysis.

Answered: 1 week ago