Comp. sci algorithms, Data Structure & Algorithms

1. develop an algorithm which reads two decimal numbers x and y and determines and prints out wether x>y or y>x. the input values, x and y, are whole number > or equal to 0, which are input by a single read, i.e. they cannot be read or "looked at" digit by digit. The two input values are guaranteed not to be equal to one another. for this question its is not possible to compare two numbers directly, however, comparison of two digits is allowed. you are allowed to use of all basic arithmetic operations. As well, n named sub-algorithm called Power (a,b), when invoked returns a^b, can be used.
Posted Date: 9/23/2012 3:13:21 PM | Location : United States







Related Discussions:- Comp. sci algorithms, Assignment Help, Ask Question on Comp. sci algorithms, Get Answer, Expert's Help, Comp. sci algorithms Discussions

Write discussion on Comp. sci algorithms
Your posts are moderated
Related Questions
DEPTH FIRST SEARCH (DFS) The approach adopted into depth first search is to search deeper whenever possible. This algorithm frequently searches deeper through visiting unvisite

Ask question 1. Indicate whether each of the following properties is true for every Huffman code. a. The codewords of the two least frequent symbols have the same length. b. The

What are the things require to implement ADT Abstract data types are very useful for helping us understand the mathematical objects which we use in our computations but, of cou

Insertion: Records has to be inserted at the place dictated by the sequence of keys. As is obvious, direct insertions into the main data file would lead to frequent rebuilding of

You have to design a framework of a Genetic Algorithm (GA) with basic functionality. The basic functionality includes representation, recombination operators, tness function and se

In the previous unit, we have discussed arrays. Arrays are data structures of fixed size. Insertion and deletion involves reshuffling of array elements. Thus, array manipulation

An algorithm is a sequence of steps to solve a problem; there may be more than one algorithm to solve a problem. The choice of a particular algorithm depends upon following cons

What is Assertions Introduction At every point in a program, there are generally constraints on the computational state that should hold for program to be correct. For ins

Explain the Memory Function method The Memory Function method seeks to combine strengths of the top  down and bottom-up approaches  to  solving  problems  with  overlapping  su

Linear search is not the most efficient way to search an item within a collection of items. Though, it is extremely simple to implement. Furthermore, if the array elements are arra