Ask Question, Ask an Expert

+1-415-315-9853

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

1 discuss the major causes of software maintenance

1. Discuss the major causes of software maintenance problems. 2. What is reverse engineering? 3. What is refactoring? 4. Characterize the evolution and servicing stage of software maintenance.

Consider the following bcnf relational schema for a portion

Consider the following BCNF relational schema for a portion of a university database (type information is not relevant to this question and is omitted): Suppose you know that the following queries are the five most commo ...

Ethical issues in ai speculate as to possible ethical

Ethical issues in AI ... Speculate as to possible ethical issues arising from the use of AI in IT. Create a document which summarizes the issue and then state your own analysis of the situation. Be sure to cite a specifi ...

In the density-based outlier detection method of section

In the density-based outlier detection method of Section 12.4.3, the definition of local reachability density has a potential problem: lrdk(o) = ∞ may occur. Explain why this may occur and propose a fix to the issue.

Suppose your studying partner states that the opportunity

Suppose your studying partner states that the opportunity cost of studying chapter 1 of your microeconomics textbook is about 1/25 the price you paid for the book, since the chapter is about 1/25 of the book. Do you agre ...

In this assignment you will investigate and learn more

In this assignment, you will investigate and learn more about your own computer. Review the presentation W3 Lecture 2 as it will show you how to find the information on your computer. Review the lectures for Week 3 as th ...

Your organization faces an ethical dilemma a problem with

Your organization faces an ethical dilemma. A problem with your accounting process has resulted in higher profits being reported than were actually earned. You are attending a meeting where senior management is deciding ...

Discussion requires that you watch the video about lincoln

Discussion requires that you watch the video about Lincoln Electric. https://www.youtube.com/watch?v=kCGiB9heV6k&feature=youtu.be Include these thoughts in your answer: What parts of the management style of this company ...

Createnbspan 8- to 12-slide Create  an 8- to 12-slide Microsoft ®  PowerPoint ® training

Create  an 8- to 12-slide Microsoft ®  PowerPoint ® training presentation that would be used to educate new members of your company's desktop support team about their role and their responsibilities related to appropriat ...

With the use of technology also comes the responsibility of

With the use of technology also comes the responsibility of businesses to secure the data of internal and external stakeholders. Create  a plan that identifies 5-7 security or privacy issues that might occur at the busin ...

  • 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

A cola-dispensing machine is set to dispense 9 ounces of

A cola-dispensing machine is set to dispense 9 ounces of cola per cup, with a standard deviation of 1.0 ounce. The manuf

What is marketingbullwhat is marketing think back to your

What is Marketing? • "What is marketing"? Think back to your impressions before you started this class versus how you

Question -your client david smith runs a small it

QUESTION - Your client, David Smith runs a small IT consulting business specialising in computer software and techno

Inspection of a random sample of 22 aircraft showed that 15

Inspection of a random sample of 22 aircraft showed that 15 needed repairs to fix a wiring problem that might compromise

Effective hrmquestionhow can an effective hrm system help

Effective HRM Question How can an effective HRM system help facilitate the achievement of an organization's strate