Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

coding C++ programming Write A COMPLETE C++ PROGRAM by addressing the following criteria. Suppose that a text file TestinputFile24.txt contains 24 characters and 24 float

coding C++ programming
image text in transcribed
Write A COMPLETE C++ PROGRAM by addressing the following criteria. Suppose that a text file TestinputFile24.txt contains 24 characters and 24 float numbers between 10 to 10 , with 1 decimal place. a) Reads the characters and rearrange the characters as a 2D array, named MatA with dimension of 38. Then, reads the float numbers and rearrange the numbers as two matrices namely Bij and Cjk, where i>0,j>0,k>0 and satisfied the following criteria j(i+k)=24. Display on console and store MatA, By and Ckk in the output file named YourName.txt. [25 marks] b) Computes BCit; the product of matrices in (a). Display on console and store BCik in the output file named YourName.txt. [10 marks] c) Using the Random Number Generation, generate an integer-type matrix named D with dimension of 56, where the elements/entries are in the range of {1,2,3,,50}. Then, rewrite the D as a vector, named E. Display on console and store D and E in the output file named YourName.txt. Using a void-type user-defined function; functsort and vector E of (c) as an input, sort the elements of E as a vector of sorted random numbers from lowest to highest and a vector of sorted random numbers from highest to lowest, respectively. Display on console the sorted vectors. Remark: ALL sorting process should be done in the functSort function. [25 marks]

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

Advanced Database Systems

Authors: Carlo Zaniolo, Stefano Ceri, Christos Faloutsos, Richard T. Snodgrass, V.S. Subrahmanian, Roberto Zicari

1st Edition

155860443X, 978-1558604438

More Books

Students also viewed these Databases questions

Question

a. Describe the encounter. What made it intercultural?

Answered: 1 week ago