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
没有找到相关结果