Note:
1)|| is a doubly link in the above
2)test it in main
3)Try not to make any global declarations if possible
TASK:
Write program using linked list implementation and implement the following link list :
a->Apple->Ali
||
b->Bored->Bat
||
c->Cat->Cow
Techics Comp has 5 salesmen. Each salesman keeps track of the number of computer sold
each month. The manager assigns a number, 1 to 5, to each salesperson with their name.
Write a complete C++ program to store the number of computers sold by each salesperson in
the array comp[] and output the total number of computer sold for the given month. The
program will calculate and display the highest and the lowest number of computer sold for the
month together with the salesperson’s name. It also can search the amount of sold computers
by the salesperson whether it was exist or not. If found, display the salesperson name. If not,
display it is not exist.
Your program should allow the user to repeat this process as often as the user wishes.
Create Program that will compute the Final Grade from Prelim to Finals by getting its average and show the remarks. 75 is passing score. if passed, the remarks is Passed! Congratulation! otherwise Failed! Better Luck Next Time.
Declare an array that is going to store the Prelim to Finals grade using the For Loop.
ask the user to input the grade each term(Prelim, Midterm, Prefinal and Finals).
Note: In the final grade round off the average using math function.
Analyze and debug the following program then display the output.
A.
#include <iostream>
using namespace std;
main() {
for (int i = 0; i >= 10; i = i + 2) {
cout << i << "\n";
}
return 0;
}
B.
#include <iostream>
using namespace std;
main() {
for (int i = 0; i < 10; i++) {
if (i == 4) {
continue;
}
cout << << "\n";
}
return0;
}
Create a class which only works for absolute numbers, if it
encounters any negative occurrence, then it throw an exception to its
handler and display errors.
Modify the above task, by creating an exception class with an error
code and corresponding error message. Code and message should be
thrown and displayed in catch block.
Write a template function that returns the average of all the
elements of an array. The arguments to the function should be the
array name and the size of the array (type int). In main ( ), exercise the
function with arrays of type int, long, double, and char.
Write a program to swap the contents of two variables. Use
template variables as function arguments.
Develop a febonacci series of 20 numbers . Now push these elements into stack and then pop them . After pop , each element should get inserted into queue and after dequeuing each element should get inserted in linked list and then print that linked list .
Write a program using vectors that simulates the rolling of a single die a hundred times. The program should store 100 rolls of the die. After the program rolls the die, the program then goes through the 100 elements in the vector and tallies up the number of 1 rolls, the number of 2 rolls, the number of 3 rolls, the number of 4 rolls, the number of 5 rolls, and the number of 6 rolls. The program then displays the number of the respective rolls to the user.
Develope a Fibonacci series of 20 numbers. Now push these elements into stack and then pop them.After pop each element should get inserted into queue and after dequeuing each element get inserted in link list and then print that linked list.