Question: 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!