Question: ) Write a program with the following software architecture PROGRAM main() PROCEDURE ReadX(OUT x: int) PROCEDURE IncrementX4Times(IO x: int) PROCEDURE PrintX(IN x: int) such that
) Write a program with the following software architecture
PROGRAM main()
PROCEDURE ReadX(OUT x: int)
PROCEDURE IncrementX4Times(IO x: int)
PROCEDURE PrintX(IN x: int)
such that (1) the PROCEDURE ReadX() is called by the PROGRAM module main() to input the value for main() variable x from the program user; (2) the PROCEDURE IncrementX4Times() is called by the PROGRAM module main() to add 1 (that is, increment) the value the main() variable x four different ways (using the operators + and =; using the operator +=; using the operator pre-increment ++; and using the operator post-increment ++); and (3) the PROCEDURE PrintX() is called by the PROGRAM module main() to print the value of the main() variable x at different times during main() execution, namely, after the call to ReadX() and after the call to IncrementX4Times().

Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
