Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

write a c program that declares a 2 - d integer array with 4 rows and 4 columns.the program keeps reading integer numbers from the

write a c program that declares a 2-d integer array with 4 rows and 4 columns.the program keeps reading integer numbers from the keyboard until the array is filled by only the numbers that are positive and have 1 to 4 digits.Such that, the first 4 single-digit numbers are stored in the first row and the program prints row1 full for any additional single-digit number. The first 4 two-digit numbers are stored in the second row and the program prints row2 full for any additional two-digit number. The first 4 three-digit numbers are stored in the third row. and the program prints row3 full for any additional three-digit number. The first 4 four-digit numbers are stored in the last row and the program prints row4 full for any additional single-digit number. After that, the program prints stopped and 1)print the array row by row2)print the elements on the main diagonal.Hint: single-digit numbers are from 0 to 9, two-digit numbers are from 10-99, three digits numbers are from 100 to 999,four-digit numbers from 1000 to 9999 sample input: 12345610203040501002003004005001000200030004000sample output:row1 fullrow1 fullrow2 fullrow3 fullstopped12341020304010020030040010002000300040001203004000

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Main Memory Database Systems

Authors: Frans Faerber, Alfons Kemper, Per-Åke Alfons

1st Edition

1680833243, 978-1680833249

More Books

Students also viewed these Databases questions