A) Write A Function Named PrintMultiples That Accepts An Integer N And An Integer Mas Parameters And Prints A Complete Line Of Output Reporting The First M Multiples Of N. For Example, The Following Calls: B) Print Multiples 13, 5) Print Multiples 17, 3)

匿名用户 最后更新于 2021-11-29 17:10 计算机类Computing

PHYTON

Dont use BREAK


a) Write a function named printMultiples that accepts an integer n and an integer mas parameters and prints a complete line of output reporting the first m multiples of n. For example, the following calls: b) print Multiples 13, 5) print Multiples 17, 3) should produce this output respectively: The first 5 multiples of 3 are 3, 6, 9, 12, 15 The first 3 multiples of 7 are 7, 14, 21 Notice that the multiples are separated by commas and spaces. You must exactly produce this format. b) Write a program to receive 2 integers and display the multiples using the above function. The inputting will continue until at least one of m or n become negative or 0. Sample Run: Enter first integer: 3 Enter second integer: 5 3, 6, 9, 12, 15 Enter first integer: 7 Enter second integer: 3 7, 14, 21 Enter first integer: 0 Enter second integer: 5

已邀请: