logo Use CA10RAM to get 10%* Discount.
Order Nowlogo
(5/5)

Write a function that prompts the user for the name of a file to output as a text file that will hold a two dimensional array of the long double data type

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

Write a menu based program implementing the following functions:

(1) Write a function that prompts the user for the name of a file to output as a text file that will hold a two dimensional array of the long double data type.

Have the user specify the number of rows and the number of columns for the two dimensional array.

Have the user enter the values for each row and column element in the two dimensional array.

Write the two dimensional array out as a text file. You will want the file format to be as follows:

The first two values stored in the file is the number of rows and the number of columns (use the short int data type for these first two values).

The remaining data is to be the two dimensional array being stored as long double typed values.

(2) Write a function like function #1, except in this time, instead of asking the user for the values for each row and column element, have the function create a randomly generated values for the row and column elements. Have the function that prompt the user for the name of a file to output as a text file the randomly generated values of type long double between the numbers 0 and 1, including fractional values in between such as (0.54734824682. etc). Hint: you may want to have your program generate two random numbers and divide the smaller of the two random numbers into the larger random number. You will want the file format to be as follows:

The first two values stored in the file is the number of rows and the number of columns.

. The remaining data is to be the two dimensional array being stored as long double typed values.

(3) Write a function to prompt the user for the name of a file to input as a text file to read in the two dimensional array of

 

(5/5)
Attachments:

Expert's Answer

504 Times Downloaded

Related Questions

. Introgramming & Unix Fall 2018, CRN 44882, Oakland University Homework Assignment 6 - Using Arrays and Functions in C

DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma

. The standard path finding involves finding the (shortest) path from an origin to a destination, typically on a map. This is an

Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t

. Develop a program to emulate a purchase transaction at a retail store. This program will have two classes, a LineItem class and a Transaction class. The LineItem class will represent an individual

Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th

. SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

. Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

504 Times Downloaded

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Um e HaniScience

885 Answers

Hire Me
expert
Muhammad Ali HaiderFinance

823 Answers

Hire Me
expert
Husnain SaeedComputer science

957 Answers

Hire Me
expert
Atharva PatilComputer science

837 Answers

Hire Me