Programming
Programming
#oodb&e, #oodb&e, #oodb&e, #oodb&e, #oodb&e, #oodb&e, #oodb&e, #oodb&e 1e. +ello, +ello, +ello 1f. ,dios, ,dios, ,dios, ,dios, ,dios, ,dios, ,dios, ,dios 4% esi-n t.e lo-ic /or 0 1ro-r0m t.0t out1uts ever& even number /rom ( t.rou-. 30% 223.is 1ro-r0m will out1ut 0ll even numbers t.0t /0ll in t.e 22r0n-e ( 4 30 st0rt 22 ecl0r0tions num i num increment i50 increment 5 ( w.ile i 65 30 i 5 i 7 increment out1ut i endw.ile sto1 10. Mr. Roper owns 20 apartment buildings. Each building contains 15 units that he rents for $800 per month each. Design the application that would output 12 pa ment coupons for each of the 15 apartments in each of the 20 buildings. Each coupon should contain the building number !1 through 20"# the apartment number !1 through 15"# the month !1 through 12"# and the amount of rent due. 228re0te 10&ment cou1ons /or e0c. 010rtment in t.e (0 buildin-s% 3.e cou1on 22will cont0in t.e buildin- number 1 4 (0, 010rtment number 1 4 15, mont. 1 4 1( 220nd 0mount o/ rent due% St0rt 22 ecl0r0tions num 01t9um num build9um
num mont. num RE93 5 :00 build9um 5 0 01t9um 5 0 w.ile build9um 65 (0 build9um 5 build9um 7 1 out1ut ;!uildin- <: w.ile 01t9um 6515 01t9um 5 01t9um 7 1 out1ut ;,10rtment <: w.ile mont. 65 1( mont. 5 mont. 7 1 out1ut ;Mont.: out1ut ;Rent due: endw.ile endw.ile endw.ile sto1 1$. DE%&'05(0$.t)t !onl " ** +his program displa s e,er combination of three(digit numbers start Declarations num digit1 num digit2 num digit$ while digit1 -. / while digit1 -. / while digit$ -. / output digit1# digit2# digit$ endwhile endwhile digit1 . digit1 0 1 digit$ . digit2 0 1 digit2 . digit$ 0 1 endwhile stop ?@AE : ** +his program displa s e,er combination of three(digit numbers start Declarations num digit1 num digit2
num digit$ di-it1 5 0 di-it( 5 0 di-it3 5 0 while digit1 -. / while digit( -. / while digit$ -. / output digit1# digit2# digit$ di-it3 5 di-it3 7 1 endwhile di-it( 5 di-it( 7 1 endwhile di-it1 5 di-it1 7 1 endwhile stop