Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Purpose of this assignment:
1. Gain experience with 2D arrays.
2. Learn to use strings.
Assignment:
Program #1: Write a program that prints a table of numbers with the column sums and also determines the maximum column sum.
Additional requirements:
• The table values are
5.8 8.3 9.6 3.9
4.0 7.1 11.2 2.8
-3.9 9.2 2.5 1.4
• The array values will be hard-coded into your code, but the rest of the program should be general. That is, if the array values changed, your program should work correctly for the new data. When storing the array values, you will need to at least specify the number of columns.
• To find the size of the array in a more general manner, you can use

rows = sizeof( array_name ) / sizeof( array_name[0] );
cols = sizeof( array_name[0] ) / sizeof( double );

where rows and cols are variables of type int and array name is the name of the array storing your data.

• Right-justify the values in the table.
• Your program must compile as a C89 program.
• Don't use global variables.
Sample Output: Here is some sample output to give you an idea of what you are trying to achieve.
You do not need to match this output exactly.
5.8 8.3 9.6 3.9
4.0 7.1 11.2 2.8
-3.9 9.2 2.5 1.4
=====================
5.9 24.6 23.3 8.1
The maximum column sum is 24.6


Program #2: Write a program that decrypts a secret message. The message in its encrypted form is

Tiks!ks!yhz"CTG swlfu.

On the course website is a text file that contains this message, so you don't need to cut and paste it from this PDF.
Additional requirements:
• To decrypt the message, you will change the ASCII value of the text based upon the result of dividing the array index value of the string by three:

remainder action
0 subtract 0
1 subtract 1
2 subtract 2

For example, the first character in the array has an index of 0, so 0%3 has a remainder of 0 and the character doesn't change. The second character of the array has an index of 1, so 1%3 has a remainder of 1 and you subtract 1 from the character i. Continue this process for the entire string.
• Your program must compile as a C89 program.
• Don't use global variables.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M9642700

Have any Question?


Related Questions in Computer Engineering

Serial port assignmentdesign write and debug an mc8051

Serial Port Assignment Design, write, and debug an MC8051 assembly program which does the following: Configure the serial port to mode 1 with enabled reception and 9600 BAUD rate for the DS89S420 microcontroller. Also co ...

An array a1 n is said to have a majority element if more

An array A[1 . . . n] is said to have a majority element if more than half of its entries are the same. Given an array, the task is to design an efficient algorithm to tell whether the array has a majority element, and, ...

Where do cfos get their money newswhere do cfos get their

Where do CFOs get their money news? Where do CFOs get their money news? According to Robert Half International, 47% get their money news from newspapers, 15% get it from communication/colleagues, 12% get it from televisi ...

Assignmentroyal wallace a uk-based transportation company

Assignment Royal Wallace, a UK-based transportation company, is a global leader in the rail equipment and servicing industry. Its wide-range of products includes passenger rail vehicles and total transit systems. It also ...

As part of a bear population study data were gathered on a

As part of a bear population study, data were gathered on a sample of black bears in the western United States to examine the relationship between the Bear's neck girth (distance around the neck) and the weight of the be ...

Can someone help me identify how intrustion detection

Can someone help me identify how Intrustion detection system and intrusion prevent system can help protect confidentiality, integrity and availability

Question do a research on the internet and discuss about

Question : Do a research on the Internet and discuss about the history of development of the networking field. Also discuss some of the recent trends in the networking area, (approx 200 words)

Take the input of numbers and reverse the order of elements

Take the input of numbers and reverse the order of elements in that vector using recursion.

Start by assigning to variable answers a list containing an

Start by assigning to variable answers a list containing an arbitrary sequence of strings 'Y' and 'N'. For example: answers= ['Y','N','N','Y','N','Y','Y','Y','N','N','N'] Write Python statements corresponding to the foll ...

Determine the molar volume of co2 at 400 k and 100 atm

Determine the molar volume of CO2 at 400 K and 100 atm using the van der Waals equation with a = 3.592 l^2atm mol^-2 and b = 0.04267 l/mol

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As