Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

problem 1) Count the number of zeros in 69!.

problem 2) A magic square is the square matrix of integers such that sum of every row, the sum of every column and sum of each of the diagonal are same. Such a magic square is given below:

8 1 6
3 5 7
4 9 2

prepare a program to show a magic square.

problem 3) Find out a appropriate representation for polynomials in the single variable based on arrays. A polynomial p(x) is of the form: 5 x 3 - 10 x + 23. prepare the program that given p(x) and a point, say x = 1, determine the value of p(x) at that point. Like, the value of the polynomial 5 x 3 - 10 x + 23 at x = 1 is 18.

Given two polynomials, prepare different functions for performing polynomial arithmetic involving operations of +, - and *. Or, prepare the complete definitions of the following function prototypes:

void add ( float *p, degp, float *q, degq, float *res, degres );
void sub ( float *p, degp, float *q, degq, float *res, degres );
void mult ( float *p, degp, float *q, degq, float *res, degres );

where p, q and polynomials with degrees 'degp' and 'degq' respectively and res is resulting polynomial of degree degres that holds after the polynomial arithmetic +, -, *

problem 4) This assignment deals with creating data structure for large numbers (nonnegative). You have to read from an input file, say, "input", data of the following type:

980089673400089200098129823 # 120006734009867453400 #

23457689020#

1000000000000000000209 #

34567892 #

Note that every big number is followed by hash(#) symbol as shown above. Furthermore digits of the big number are consecutive ( you may suppose this to be always true in the input if which simplifies the design ). Neither the number of digits in a big number is known apriori nor is the number of such large numbers in the input file.

Program must read such input file and produce output file of the following form:

/* Output From Program */

Big Number 1 : 27 digits : 980089673400098200098129893

Big Number 2 : .......................................

Note that representation selected for a big number is to be a linked list each of whose node must contain certain fragments of the large number. A possible representation is outlined below but you may select a different one if you so please. A node may be defined as:

i) a short integer and a

ii) link.

Data of the first node must hold the no. of digits in the number; data of remaining nodes would store 4 consecutive digits of the large number. The internal representation for the first input number would be:

27 -> 9800 -> 8967 -> 3400 -> 982 -> 9 -> 8129 -> 893

Though, when you generate back the number, you have to account for the missing zeros in the above representation. You may select to read the input as a character array, convert to numbers as you proceed and assemble the linked list.

Computer Engineering, Engineering

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

Have any Question?


Related Questions in Computer Engineering

Question describe and discuss at least two backup

Question: Describe and discuss at least two backup strategies. Discuss the use of cloud backup strategies, as well? The response must be typed, single spaced, must be in times new roman font (size 12) and must follow the ...

Questions1 suppose you have single connected linkedlist try

Questions: 1. Suppose you have single connected linkedlist. Try to print the list from tail to head using recursive thinking. 2. Explain what is the max heap data structure? 3. Suppose I have a linkedlist data structure. ...

Given an undirected graph with both positive and negative

Given an undirected graph with both positive and negative edge weights, design an algorithm to find a maximum spanning forest with the largest total edge weights.

Question suppose direction is an integer angle between 0

Question : Suppose direction is an integer angle between 0 and 359 degrees. You turn by a given angle and update the direction as direction = (direction + turn) % 360; In which situation do you get the wrong result? How ...

You are required but not limited to turn in the following

You are required, but not limited, to turn in the following source file: Requirements to get full credits in Documentation The assignment number, your name, StudentID, Lecture number(time), and a class description need t ...

Social networking sites such as myspace and facebook pose

Social networking sites such as MySpace and Facebook pose interesting new questions for privacy protection. Describe how privacy may be threatened by the use of these sites. Are these problems significant? How should pri ...

Question the discussion board db is part of the core of

Question: The Discussion Board (DB) is part of the core of online learning. Classroom discussion in an online environment requires the active participation of students and the instructor to create robust interaction and ...

Mccann co has identified an investment project with the

McCann Co. has identified an investment project with the following cash flows. Year Cash Flow  1     $800   2    1,090   3    1,350   4    1,475  a. If the discount rate is 7 percent, what is the present value of these c ...

Say you want to match ip addresses however its likely that

Say you want to match IP addresses. However, it's likely that an invalid IP address such as 192.168.1.256 will match with your regex as well. What would you would need to do to validate that an IP address is valid, and w ...

Sorting program note make sure you use c programming

Sorting Program Note: Make sure you use c++ programming otherwise i will not grade your work For this assignment, you are to write a comparative algorithm that will compare the efficiency of three sorting routines. Here ...

  • 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