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

Assignment Help:

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.

 


Related Discussions:- Pseudocode algorithm to print the numbers from 1 to 10

Random searching, write aprogram for random -search to implement if a[i]=x;...

write aprogram for random -search to implement if a[i]=x;then terminate other wise continue the search by picking new randon inex into a

Define about the class invariant, Define about the class invariant A cl...

Define about the class invariant A class invariant may not be true during execution of a public operation though it should be true between executions of public operations. For

find shortest path from a to z using dijkstra''s algorithm., Q.  In the gi...

Q.  In the given figure find the shortest path from A to Z using Dijkstra's Algorithm.    Ans: 1.  P=φ;  T={A,B,C,D,E,F,G,H,I,J,K,L,M,Z} Let L(A)

Properties of red- black tree, Any Binary search tree has to contain follow...

Any Binary search tree has to contain following properties to be called as a red- black tree. 1. Each node of a tree must be either red or black. 2. The root node is always b

What is assertions, What is Assertions Introduction At every point...

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

Define stack lifo, A stack is a last in, first out (LIFO) abstract data typ...

A stack is a last in, first out (LIFO) abstract data type and sequential data structure. A stack may have any abstract data type as a component, but is characterized by two fundame

Explain depth-first traversal, Depth-first traversal A depth-first t...

Depth-first traversal A depth-first traversal of a tree visit a node and then recursively visits the subtrees of that node. Likewise, depth-first traversal of a graph visits

Define dynamic programming, Define Dynamic Programming  Dynamic  progra...

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

The complexity ladder, The complexity Ladder: T(n) = O(1). It is ca...

The complexity Ladder: T(n) = O(1). It is called constant growth. T(n) does not raise at all as a function of n, it is a constant. For illustration, array access has this c

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd