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

An ip datagram has arrived with the following partial

An IP datagram has arrived with the following partial information in the header (in hexadecimal): 45000054 00030000 2006... a. What is the header size? b. Are there any options in the packet? c. What is the size of the d ...

To make the initial sequence number a random number most

To make the initial sequence number a random number, most systems start the counter at 1 during bootstrap and increment the counter by 64,000 every half second. How long does it take for the counter to wrap around?

A steeple-building robot looks for two blocks that are

A steeple-building robot looks for two blocks that are clear and puts one of them on top of the other (if the block being moved can be located as being on some other block or on the floor). Write down a first-order predi ...

1 discuss the pros and cons of shared vs private l2 caches

1. Discuss the pros and cons of shared vs. private L2 caches for both single-threaded, multi-threaded, and multi programmed workloads, and reconsider them if having on-chip L3 caches. 2. Assume both benchmarks have a bas ...

Define the aspects of a swot analysis and how it can

Define the aspects of a SWOT analysis and how it can benefit a company.

You can use a stack to check whether a programming

You can use a Stack to check whether a programming statement or a formula has balanced parentheses. Write a Windows application that provides a textbox for the user to enter an expression with parenthesis. Provide a Chec ...

1 how do you get the first character of a string the last

1. How do you get the first character of a string? The last character? How do you remove the first character? The last character? 2. How do you get the last digit of an integer? The first digit? That is, if n is 23456, h ...

Analyze the hersheys enterprise system creates halloween

Analyze the Hershey's Enterprise System Creates Halloween Tricks caseNew Window. Prior to the Year 2000 transition, Hersey's Corporation planned a major systems project to implement a new ERP system. While the case is no ...

The cashregister class has an unfortunate limitation it is

The CashRegister class has an unfortunate limitation: It is closely tied to the coin system in the United States and Canada. Research the system used in most of Europe. Your goal is to produce a cash register that works ...

The work of an it department is never finished the wvcc

The work of an IT department is never finished. The WVCC network administrators and student assistants have many plans for the next network upgrade. Their main concern at this point is availability. Although the hierarch ...

  • 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

Section onea in an atwood machine suppose two objects of

SECTION ONE (a) In an Atwood Machine, suppose two objects of unequal mass are hung vertically over a frictionless

Part 1you work in hr for a company that operates a factory

Part 1: You work in HR for a company that operates a factory manufacturing fiberglass. There are several hundred empl

Details on advanced accounting paperthis paper is intended

DETAILS ON ADVANCED ACCOUNTING PAPER This paper is intended for students to apply the theoretical knowledge around ac

Create a provider database and related reports and queries

Create a provider database and related reports and queries to capture contact information for potential PC component pro

Describe what you learned about the impact of economic

Describe what you learned about the impact of economic, social, and demographic trends affecting the US labor environmen