Questions: 1 680

Answers by our Experts: 1 680

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

The sum of all odd numbers between a and b (inclusive), where a and b are inputs
Write a program that prompts the user to input a four-digit positive integer. The program then outputs
the digits of the number, one digit per line.
Write a program that prompts the user to input a four-digit positive integer. The program then outputs
the digits of the number, one digit per line. For example, if the input is 3245, the output is:
3
2
4
5
Write a program that prompts the user to input the x-y coordinate of a point in a Cartesian plane. The
program should then output a message indicating whether the point is the origin, is located on the x-
(or y-) axis, or appears in a particular quadrant. For example:
(0, 0) is the origin
(4, 0) is on the x-axis
(0, -3) is on the y-axis
(-2, 3) is in the second quadrant
Given is an ordered deck of n cards numbered 1 to n with card 1 at the top and card n at the
bottom. The following operation is performed as long as there are at least two cards in the deck:
Throw away the top card and move the card that is now on the top of the deck to the
bottom of the deck.
Your task is to find the sequence of discarded cards and the last, remaining card.
Each line of input (except the last) contains a number 2 ≤ n ≤ 52. The last line contains 0 and this line
should not be processed.
Sample:
Input:
7
19
2
0
Output:
Discarded cards: 1, 3, 5, 7, 4, 2,
Remaining card: 6
Discarded cards: 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 4, 8, 12, 16, 2, 10, 18, 14,
Remaining card: 6
Discarded cards: 1,
Remaining card: 2

The Tower of Hanoi is a mathematical game or puzzle. It consists of three rods and a number

of disks of different sizes, which can slide onto any rod. The puzzle starts with the disks in a

neat stack in ascending order of size on one rod, the smallest at the top, thus making a conical

shape. The objective of the puzzle is to move the entire stack to another rod, obeying the

following simple rules:

• Only one disk can be moved at a time.

• Each move consists of taking the upper disk from one of the stacks and placing it on top of

another stack.

• No disk may be placed on top of a smaller disk.

Design an iterative and recursive algorithm for above mathematical game.


1. Write a menu-driven program to perform the following operations in a double linked list by using suitable user-defined functions for each case.
a) Traversal of the list.
b) Check if the list is empty.
c) Insert a node at a certain position (at beginning/end/any position).
d) Delete a node at a certain position (at beginning/end/any position).
e) Delete a node for the given key.
f) Count the total number of nodes.
g) Search for an element in the linked list.
Verify & validate each function from main method.

WAP to create a class which stores a dynamic integer array and its size. Include all the constructors and destructor in the class. Store two arrays of different size in two objects. Join the two arrays and and store it in another object using a member function.


Implement conversion from INFIX to POSTFIX and evaluation of POSTFIX


Is that provided code implemented with all the functionalities given in question?.I think,last 2 functionalities are not implemented in the code...can you please confirm back to me.

Thanks,



LATEST TUTORIALS
APPROVED BY CLIENTS