Write a program to compute the sum of two matrices

Assignment Help Programming Languages
Reference no: EM131225977

Electrical Engineering Computer Methods Assignment

Q1. Write a program that given the following array, reverses all array elements and then prints them.

int x[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};

Q2. Write a program to define a 1D array of 1000 element and fill it with a random values (using rand() function) between 1 and 1000 (integers), then searches and counts the number of values that can be exactly divided by 5. Finally print these values with their index numbers.

Q3. Write a program to compute the sum of two matrices and then print it. Firstly user will be asked to enter the order of matrix (number of rows and columns) and then two matrices.

For example if the user entered order as 2, 2 i.e. two rows and two columns and matrices as

First Matrix:-

1              2

3              4

Second Matrix:-

4              5

-1            5

Then output of the program (sum of First and Second matrix) will be

5              7

2              9

Q4. Write a program that will read five values from the keyboard (use a loop) and store them in an array of type float with the name amounts. Create two arrays of five elements of type long with the names dollars and cents. Store the whole number part of each value in the amounts array in the corresponding element of dollars and the fractional part of the amount as a two-digit integer in cents (e.g., 2.75 in amounts[1] would result in 2 being stored in dollars[1] and 75 being stored in cents[1]). Output the values from the two arrays of type long as monetary amounts (e.g., $2.75).

Reference no: EM131225977

Questions Cloud

Euro zone monetary policy : Why participating in the euro zone causes a country to give up its independent monetary policy and control over its domestic interest rates.
Exceed sales targets or production targets : Class, we reward employees who exceed sales targets or production targets. Is there any reason not to likewise reward employees who exceed safety goals and/or practices that a company has established?
What does this implyabout the size of elasticity of demand : Sales ofpleasure boats fell by nearly 90 percent in southernFlorida as prospective buyers bought boats in theBahamas to avoid paying the tax. What does this implyabout the size of the elasticity of demand?
Company general nutrition center : In this module, you have learned about with what a SWOT is, how they are conducted, and how they are used. It's now your turn to create a SWOT matrix for a company of your choice (you must NOT use the company General Nutrition Center, GNC).
Write a program to compute the sum of two matrices : EEL 2161 Electrical Engineering Computer Methods Assignment. Write a program to compute the sum of two matrices and then print it. Firstly user will be asked to enter the order of matrix (number of rows and columns) and then two matrices
Case of national federation of independent business-sebelius : Create a summary of the facts as the court found them to be in the case of National Federation of Independent Business v. Sebelius, what was the courts opinion and what type of court gave the opinion? if it was a higher court that gave the final verd..
Economic indicators that would affect : What are some economic indicators that would affect how Under Armour performs?
Consumer financial protection bureau : As a result of the Financial Reform Act of 2010, the Consumer Financial Protection Bureau was established and housed within the Federal Reserve. - Explain the role of this bureau.
Which country are you focusing : 1) Which country are you focusing? 2) What changes/innovations interest you in that country? 3) Which companies are involved?

Reviews

len1225977

9/30/2016 2:06:14 AM

You don't have to send me the C files. Just copy the programming and paste it in a word doc, so then I go myself and c&p to my C files.

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

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