how to take time as input in the format (12:02:13) from
user so that controls remains between these columns?
Definition of priority queue was given. We have to implement the priority queue using array of pointers with the priorities given in the range 1..n. The array could be accessed using the variable top. The list corresponding to the array elements contains the items having the priority as the array index. Adding an item would require changing the value of top if it has higher priority than top. Extracting an item would require deleting the first element from the corresponding queue. The following class was given: class PriorityQueue { int *Data[100]; int top; public: void put(int item, int priority); // inserts the item with the given priority. int get(int priority); // extract the element with the given priority. int count(); // returns the total elements in the priority queue. int isEmpty(); // check whether the priority queue is empty or not. }; We had to implement all these class functions.
0 Answers Nagarro, Wollega University,
Code for Easily Using Hash Table?
write a program that accepts a number and outputs its equivalent in words. take note that the maximum input is 3000
write a program to calculate the amount of investment after a period n years if the principal investors was p and interest is calculated using compound interest,formular=a=p(1+r)^n
0 Answers Jomo Kenyatta University,
how to find out the maximum number out of the three inputs.
6 Answers ABC, Apple, C3I, HP, TCS,
Ask the user to input three positive integers M, N and q. Make the 2 dimensional array of integers with size MxN, where all the elements of I (I = 1,…,M) line will be members of geometrical progression with first element equal to the number of line (I) and denominator q.
what is virtual constroctor ? give an exam for it?-(parimal dhimmar)
Display Pattern: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 …
Show by induction that 2n > n2, for all n > 4.
2 Answers Karvy, Qatar University,
Performance Algorithm A performs 10n2 basic operations and algorithm B performs 300 lg n basic operations. For what value of n does algorithm B start to show its better performance?
0 Answers ASD Lab, Qatar University, UNV,
Write a program using two-dimensional arrays that determines the highest and lowest of the 12 input values. Example: Enter 12 numbers: 13 15 20 13 35 40 16 18 20 18 20 14 highest: 40 lowest: 13
write a program that reads a series of strings and prints only those strings begging with letter "b"