Define a function called digits that accepts two integer numbers m and n , and that displays m rows of n columns using the following pattern of digits. The first row starts with 1, the second row with 2, and so on until the 10th row starts with 0. Then the counter returns to 1 for the 11th row, then to 2 for the 12th, etc. For columns, the numbers are always incremented by 1 from the previous column, Except for the 9 that goes to 0. For example, the call digits(4, 7) must produce: 1234567 2345678 3456789 4567890 and the call numbers(12, 23) must produce: 12345678901234567890123 23456789012345678901234 34567890123456789012345 45678901234567890123456 56789012345678901234567 67890123456789012345678 78901234567890123456789 89012345678901234567890 90123456789012345678901 01234567890123456789012 12345678901234567890123 23456789012345678901234 Note that your function should not return anything, only display at the console.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
100%

Define a function called digits that accepts two integer numbers m and n , and that displays m rows of n columns using the following pattern of digits. The first row starts with 1, the second row with 2, and so on until the 10th row starts with 0. Then the counter returns to 1 for the 11th row, then to 2 for the 12th, etc. For columns, the numbers are always incremented by 1 from the previous column, Except for the 9 that goes to 0.

For example, the call digits(4, 7) must produce:

1234567
2345678
3456789
4567890
and the call numbers(12, 23) must produce:

12345678901234567890123
23456789012345678901234
34567890123456789012345
45678901234567890123456
56789012345678901234567
67890123456789012345678
78901234567890123456789
89012345678901234567890
90123456789012345678901
01234567890123456789012
12345678901234567890123
23456789012345678901234
Note that your function should not return anything, only display at the console.

 

Expert Solution
steps

Step by step

Solved in 4 steps with 1 images

Blurred answer
Knowledge Booster
Types of Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education