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
write a algorithsm in c to perform push and pop operations stastic implementation using array ?

Since the stack is list of elements, the queue is also a list of elements. The stack & the queue differ just in the position where the elements may be added or deleted. Similar to

Consistent Heuristic Function - Graph Search Recall the notions of consistency and admissibility for an A* search heuristic. a. Consider a graph with four nodes S, A, B, C,

red black tree construction for 4,5,6,7,8,9

A spanning tree of any graph is only a subgraph that keeps all the vertices and is a tree (having no cycle). A graph might have many spanning trees. Figure: A Graph

Q. Suggest a method of implementing two stacks in one array such that as long as space is there in an array, you should be capable to add an element in either stack. Using proposed

A linear collection of data elements where the linear node is given by means of pointer is known as Linked list

Regis lives in Brazil and frequently travels to USA, Japan and Europe. He wants to be able to convert Brazilian Reais into US dollars, European euros and Japanese yen. Conversion f

Which are the two standard ways of traversing a graph? i. The depth-first traversal   ii. The breadth-first traversal

A connected graph is a graph wherein path exists among every pair of vertices. A strongly connected graph is a directed graph wherein every pair of distinct vertices is connecte