Write a program to do calculations with a 2-d array

Assignment Help C/C++ Programming
Reference no: EM13936648

I'm to write a program to do calculations with a 2-d array. The following functions are to be developed to support a new development initiated by a local Multi-Optimal-Dimension Company (MAD COMP). Your program should handle any two dimensional array up to 100 by 100. (Dimension your array 100 by 100) You will need two arrays in your program for some of the functions below. The user will supply you with the dimensions at the time your program starts running. If the user gives you as input 5 and 10, then you are to process an array that is 5 rows and 10 columns, which is part of the 100 by 100 array you defined in your program. If the user gives you 25 by 75, then you have an array 25 rows and 75 cols which is part of the 100 by 100 array you defined in your program. You will not have multiple arrays with different dimensions. Your two arrays in your code will be the same size.
(I will supply you a pseudo main program to test you code with.).

You are to development the following functions to support this effort. Write a function for each of the following actions.

Add any two rows together, place results in the second argument (second row)

Subtract any two rows, (second row from first row )

place results in the second argument.

Add any two columns together, place results in the second argument.

Subtract any two columns, (second col form first col.)

place results in the second argument.

Copy one array into the other array: second argument.

Find the largest number in any row.

Find the largest number in any column.

Find the smallest number in any row.

Find the smallest number in any column.

Replace any element in the array with a new value

Ex call: Replace(array, r, c, newvalue)

Print out the array, one row per line. (yes for my test, a row will fit on one line.)

Put a blank between your values.

Example function: AddRow( array, firstrow, secondrow) or AddRow( myAry, 3,7)

I've written a program so far to let the user input the dimensions of the the 1st array (I named it ARRAYL and it's dimensions ROWSL and COLML; ARRAYB, ROWSB, and COLMB are for the 100x100 array.), as well as the subtraction/addition of rows and columns, the replacing of array values, the copying the 1st array content into 100x100 array, and the print array function. The problem is when I build the program, it literally gives me 30 errors such as

Line Message

9 expected ',' or '...' before numeric constant

42-48 can't convert 'double (*)[100]' to int (*)[100] for argument '1' to (whatever name I gave to the functions)


Attachment:- 2dstuff (1).txt

Reference no: EM13936648

Questions Cloud

Item is to identify causes of erp implementation : This assessment is worth 45% of the total available marks for this course. The purpose of this assessment item is to identify causes of ERP implementation failure at Waste Management Company and provide possible solutions which can be used for fut..
What is the selling price per unit : What operating profit percentage on revenues is needed to attain the target return on investment of 20%? What is the selling price per unit?
Compare the designations of threatened, endangered : Identify and discuss four ways in which forest trees are currently harvested. Which method is the most ecologically sound, and why? Which method is the most economical?
Set of experience knowledge structure : Set of Experience Knowledge Structure (SOEKS) is knowledge representation in an artificial system that would support discovering, adding, storing and sharing knowledge through experience in a similar way that humans DNA do. SOEKS is then later car..
Write a program to do calculations with a 2-d array : You are to development the following functions to support this effort. Write a function for each of the following actions.
Analyse and evaluate intellectual property requirements : Analyse and evaluate intellectual property requirements associated with commercial innovation
Relationship between deforestation and wildlife extinction : In the deforestation segment, show estimations of the current and potential impact of deforestation on world cultures. Finally, take the visitors from land to the aquatic life zones. Describe methods that could be (or already are being) implemente..
What are the advantages of using an ordered array : What are the inefficiencies associated with using an unordered array if duplicates are not allowed? What are the advantages of using an ordered array? When would using an unordered array be preferred over using an ordered array
Essential you develop factual and logical arguments : The purpose of this assignment is to conduct a feasibility study and report whether it would be wiser to implement ERP systems in SMEs. You need to think about what are the critical success factors, has any one conducted feasibility studies for a..

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Produce a top-level design for your program

You are required to code the program using the C++ Programming Language. Your program should be properly laid out and should be modular, making sure that software engineering aspects of modularity and reusability as fully considered.

  Write a for loop that adds the integers

Assume the int variables i , lo , hi , and result have been declared and that lo and hi have been initialized. Write a for loop that adds the integers between lo and hi (inclusive), and stores the result in result .

  Lexicographically preceding permutation

Output a single line containing a space separated list of integers which is the lexicographically preceding permutation of the input permutation.

  Write a program that first prompts the user

Write a program that first prompts the user (repeatedly , if necessary) to supply a single digit(0,1,2..9) The program should repeatedly prompt the user for integer values until a sentinel value of 0 is entered to terminate the program.

  Program that incorporates these two functions

Write the program that incorporates these two functions, as described. You will notice that the two functions have very similar statements, so you are doing some repetitive C++ code.

  Determines the largest value

Write a program Largest that reads three integers from the user and determines the largest value - Write a program InOrder that reads three integers from the user and prints the three integers in sorted order.

  Write a program in c that will find smallest value

Write a programe c that will find the smallest, largest and average values in a collection of N numbers.Get the value of N before scanning each value in the collection of N numbers.

  Information about different automobile parts

While entering the information about different automobile parts in the application, the database administrator enters the prices of some parts incorrectly. The prices are swapped between various parts.

  How the function delete can be implemented for arrays

Explain in details how the function Delete() can be implemented for arrays to function exactly as it would with lists. Use pseudo code to clarify your explanation.

  Calculate the total of a purchase from a farmer''s market

You will develop a program that can calculate the total of a purchase from a farmer's market that sells apples, bananas, and oranges. At this particular market, apples are $1.99/lb., bananas are $0.99/lb., and oranges are $1.50/lb. Users should be..

  Why can not the this pointer be used in nonmember functions

Why can't the this pointer be used in nonmember functions? Why should the overloaded assignment operator return *this? What does *this always refer to? How is the operator keyword used?

  Randominrange() function that accepts two integer

Write a randomInRange() function that accepts two integer parameters. The parameters will represent the low number and the high number (both inclusive) in the random range. For example, when the function receives 3 and 8.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd