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

  Compute triangle area

Write a program with a form that contains three labels & text boxes (Base, Height & Area) in addition to a button labeled compute Triangle Area. The user must enter the base and height to find the area. (Triangle Area = 0. 5base x Height)

  Write a count occurrences() function that accepts a string

Write a CountOccurrences() function that accepts a string to be searched and a sub-string to be found. The function should return the # of times the sub-string is found. Write a tester file that declares a secret sentence as a constant.

  Implementing the tictac-toe game

A software company that develops games has just hired you! Before working on the next version of Medieval Menace they have given you the task of implementing the tictac-toe game in C++

  Throws an exception from a deeply nested

Write a program that throws an exception from a deeply nested function and still has the catch handler following the try block enclosing the initial call in main catch the exception

  Time conversion

Write a C++ program that takes an Eastern standard time in hours, minutes, and seconds,and prints it out in Central time, Mountain time, or Pacific time.

  Struct definition to represent the data of a person''s bank

Define a struct definition to represent the data of a person's bank account. There will be one string for the name, and two doubles for balance and interest rate. Declare two variables of this new type in the main function. Modify the values of each ..

  Design an application for the homestead furniture

Design an application for the Homestead Furniture Store that gets sales transaction data, including an account number, customer name, and purchase price. Output the account number and name, then output the customer's payment for each month for the ne..

  Branching statements to control the flow of a program

The purpose of this exercise is to give you an opportunity to practice using cin to handle user keyboard inputs, use branching statements to control the flow of a program, and work on your C++ programming style

  Implement recursive algorithms using a stack

Show the difficulties of the added complexity and which of the two sorts is easier to implement nonrecursively? Why?

  Practice with c functions

This homework will give you practice with C++ functions as well as string manipulation.

  Least number of comparisons needed

What is the least number of comparisons needed to sort an array of 6 numbers, in the worst case, using any sorting algorithm that sorts with binary comparisons? Explain

  Questions of c programming

Write a program in C++ to ask the user to input a set of characters, one at a time separated by the carriage return (Enter). Each character, as well as, its corresponding ASCII value should be stored in a linked list node.

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