Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

answer in C++ only No others Write A COMPLETE C++ PROGRAM by addressing the following criteria. Suppose that a text file TestinputFile24.txt contains 24 characters

answer in
C++ only No others 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

Database 101

Authors: Guy Kawasaki

1st Edition

0938151525, 978-0938151524

More Books

Students also viewed these Databases questions

Question

f. Did they change their names? For what reasons?

Answered: 1 week ago