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

In a network using the selective-repeat protocol with m 4

In a network using the Selective-Repeat protocol with m = 4 and the sending window of size 8, the value of variables are S f = 62, S n = 67, and R n = 64. Packet 65 has already been acknowledged at the sender site; packe ...

Question 1polybius was an ancient greek writer who first

Question 1 Polybius was an ancient Greek writer who first proposed a method of substituting different two-digit numbers for each letter. The alphabet is written inside a 5-by-5 square matrix which has numbered rows and c ...

Assignment1must be a 200-300 word responsesupporting

Assignment 1.) Must be a 200-300 word response Supporting Activity: Version Control Concerns Discuss the concerns of trying to maintain multiple baselines of your system. For example, Microsoft in 2015 announced they wou ...

How much space would be required to store a table for an

How much space would be required to store a table for an entire idealized block cipher that operates on 64-bit blocks and that has 80-bit keys? How many rounds are in DES? How many bits are in a DES key? What is the DES ...

Design and implement a merging algorithm that uses only two

Design and implement a merging algorithm that uses only two arrays. It can be assumed that the sizes of the two data sets are known in advance. An interesting way to do this is to place the array with the biggest element ...

Think about a specific healthcare organization are there

Think about a specific healthcare organization: Are there any differences for creating an effective delivery system? Who are the important stakeholders in a healthcare delivery system? This Journal has no entries.

Design an algorithm for power evaluation that is built upon

Design an algorithm for power evaluation that is built upon a base 3 strategy rather than the current base 2 method. Compare the results for this new method with the current algorithm.

An airplane has an airspeed of 550 kmh bearing 48degreesdeg

An airplane has an airspeed of 550 km/h bearing 48degrees° north of east. The wind velocity is 50 km/h in the direction 26° north of west. Find the resultant velocity representing the path of the airplane with respect to ...

Write a program that generates 10000 random integers in the

Write a program that generates 10,000 random integers in the range of 0-9 and stores them in a binary search tree. Using one of the algorithms discussed in this chapter, display a list of each of the integers and the num ...

1 indicate dependences and their type2 assume there is no

1. Indicate dependences and their type. 2. Assume there is no forwarding in this pipelined processor. Indicate hazards and add nop instructions to eliminate them. 3. Assume there is full forwarding. Indicate hazards and ...

  • 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

WalMart Identification of theory and critical discussion

Drawing on the prescribed text and/or relevant academic literature, produce a paper which discusses the nature of group

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