| |||||||||||||||
|
|
![]() CHAPTER 4 EXERCISES 1 Study the following statement: 75 ON X GOTO 50, 90, 130, 50 integer value of X is 2? B. What integer value of X will cause control to be transferred to statement number 130? C. What, if any, integer value(s) of X will cause control to be transferred to line number 50? 2. Write an ON-GOTO statement to branch to line 60 if age (A) is 10-19, to line 80 if age is 20-39, to line 150 if age is 40-59 and to line 180 if age is 60-65. (Assume there are no ages less than 10 or greater than 65.) 3. Refer to the program in figure 4-2.
4. Given a monthly beginning bank balance and a list of transactions (deposits and checks), write a program to list deposits and checks, and compute and print the balance after each transaction. If ending balance is $500.00 or less, print a message that says A SERVICE CHARGE OF $4.00 HAS BEEN DEDUCTED FROM YOUR ACCOUNT. YOUR FINAL BALANCE IS ___________. The beginning balance is to be entered at the time of program execution, transactions are to be stored in the program. Use zero (0) to indicate end of data. Use a loop to read and process the transactions. Beginning balance $2450.25 Transactions 50.00 check
|
|
Privacy Statement - Press Release - Copyright Information. - Contact Us - Support Integrated Publishing |