Pseudocode algorithm to print the numbers from 1 to 10, Data Structure & Algorithms

1. Write a pseudocode algorithm to print the numbers from 1 to 10, and then from 10 to 1, using exactly one loop.

2. The function contains() takes a food as an argument and tells you whether the pizza contains that food. Tomas is allergic to peanuts, tuna, and onions, but strangely, eating peanuts and onions together is fine for him. Write a condition that determines whether the pizza is safe for him to eat.

 

Posted Date: 3/20/2013 2:07:50 AM | Location : United States







Related Discussions:- Pseudocode algorithm to print the numbers from 1 to 10, Assignment Help, Ask Question on Pseudocode algorithm to print the numbers from 1 to 10, Get Answer, Expert's Help, Pseudocode algorithm to print the numbers from 1 to 10 Discussions

Write discussion on Pseudocode algorithm to print the numbers from 1 to 10
Your posts are moderated
Related Questions
Q. Create a heap with the given list of keys: 8, 20, 9, 4, 15, 10, 7, 22, 3, 12                                                  Ans: Creation

Link list representation of a circular queue is more efficient as it employs space more competently, of course with the added cost of storing the pointers. Program 7 gives the link

(a) Write (delay ) as a special form for (lambda () ) and (force ), as discussed in class. (b) Write (stream-cons x y) as a special form, as discussed in class. (c) Write

The pre-order and post order traversal of a Binary Tree generates the same output. The tree can have maximum One node

Define Dynamic Programming  Dynamic  programming  is  a  method  for  solving  problems  with  overlapping  problems.  Typically, these sub problems arise from a recurrence rel

* Initialise d & pi* for each vertex v within V( g ) g.d[v] := infinity  g.pi[v] := nil g.d[s] := 0; * Set S to empty * S := { 0 }  Q := V(g) * While (V-S)

Complexity classes All decision problems fall in sets of comparable complexity, called as complexity classes. The complexity class P is the set of decision problems which ca

Write an algorithm for binary search. What are its limitations? .

Primitive Data Structure These are the basic structure and are directly operated upon by the machine instructions. These in general have dissimilar representations on different

Q. Which are the two standard ways of traversing a graph?  Explain them with an example of each.  Ans:   T he two ways of traversing a graph are written below