Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
Bartleby Related Questions Icon

Related questions

Question
100%
Write a print function that prints a matrix of rows rows and columns columns. It prints the floating point
numbers of each matrix row on one line, separated by a single space. The formatting of the float is a total
of 7 positions with an accuracy of 3 positions. The name character is the name of the array. Use the letter 'a'
for the command to print matrixA using this function.
#define MAXSIZE 10
void print (float matrix [MAXSIZE] [MAXSIZE], int rows, int columns, char name) { }
int main (void) {
print (matrixA, rows A, columns A, 'A');
}
A 3x3 matrix would be formatted like this:
Command? a
Matrix A (3 X 3):
1.000 0.000
0.000
0.000 1.000 0.000
0.000 0.000 1.000
Since the matrix matrixA has been initialised to a size of 1x1 with value 0 this should be the result of your
program:
Command? a
Matrix A (1 X 1):
0.000
Command? q
Bye!
expand button
Transcribed Image Text:Write a print function that prints a matrix of rows rows and columns columns. It prints the floating point numbers of each matrix row on one line, separated by a single space. The formatting of the float is a total of 7 positions with an accuracy of 3 positions. The name character is the name of the array. Use the letter 'a' for the command to print matrixA using this function. #define MAXSIZE 10 void print (float matrix [MAXSIZE] [MAXSIZE], int rows, int columns, char name) { } int main (void) { print (matrixA, rows A, columns A, 'A'); } A 3x3 matrix would be formatted like this: Command? a Matrix A (3 X 3): 1.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 1.000 Since the matrix matrixA has been initialised to a size of 1x1 with value 0 this should be the result of your program: Command? a Matrix A (1 X 1): 0.000 Command? q Bye!
Expert Solution
Check Mark
Step 1

The code is given below with output screenshot

Happy Coding ?

Knowledge Booster
Background pattern image
Computer Science
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
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education