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

  Create application which permits user to input a price

Create an application which allows a user to input a price until suiatble sentinel value is entered. Output is a price of each item on each day,one through seven.

  Write a standalone method named count_letters

Write a standalone method named count_letters that returns the number of occurrences of a specified letter lines in an input string

  Write a perl program that performs show current date

Write a Perl program that performs the following tasks: Generate a menu to ask the user for the task that he or she would like to see performed. The available tasks are as follows: Show current date and time

  Write a paper on memory management

Write a paper on Memory Management

  Customer ordering mobile app of a pizza house

Application should be adaptive enough to render on multiple devices with various form factors. To make customer experience best advanced capabilities like geo-location, augmented reality and mashups should be used.

  Program in perl that have two subroutines add() and multiply

Write a program in PERL that have two subroutines add() and multiply() that will add or multiply its arguments and print the result to screen.

  Correct mistakes on the command line

In this lab you will determine the shell that you are running, correct mistakes on the command line, and use filename generation. You will also learn about help that the system provides in the form of man pages, the --help option, and the bash hel..

  Write down a program that will randomly generate a number

write a program that will randomly generate a number from 1 to 100. the user will then guess the number via several

  Logic for a program that allows a user to enter 15 numbers

Design the logic for a program that allows a user to enter 15 numbers, then displays each number and its difference from the numeric average of the numbers entered

  Problematic programming situation

Suggest one example of a problematic programming situation or scenario that the use or implementation of a loop structure could resolve. Justify your response.

  Create classes for account and savingsaccount

Create and write three classes - Account, CheckingAccount, and SavingsAccount. Have CheckingAccount and SavingsAccount inherit from Account.

  Write ipo charts for program contains four value functions

Add new C++ source file to project. Name the source file Ch9AppE05. Use Ipo charts you created in step a to code program. Display gross pay with a dollar sign and two decimal places.

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