There is a structure called employee that holds information like employee code, name, date of joining. Write a program to create an array of the structure and enter some data into it. Then ask the user to enter current date. Display the names of those employees whose tenure is 3 or more than 3 years according to the given current date
ask the user to enter the year (can be 1,2,3,) &corce (HNDIT,HNDM,HNDA)
if year is 2&corece is HNDIT show him "it is time to garduate soon"
if year is 2&corece is HNDA show him "it is time to garduwate in 2 years "
if year is 3&corece is HNDM show him "it is time to garduwate soon "
if is 1 show him "you have more time in garduwate"
Given a string, an integer position, and an integer length, all on separate lines, output the substring from that position of that length.
Ex: If the input is:
Fuzzy bear
3
4
the output is:
zy b
Note: Using a pre-defined string function, the solution can be just one line of code.
#include <iostream>
#include <string>
using namespace std;
int main() {
string strVal;
int posStart;
int choiceLen;
string newString;
getline(cin, strVal);
cin >> posStart;
cin >> choiceLen;
cout << newString << endl;
return 0;
}
Name Surname Score
1. Sam Williams 60
2. John Phoenix 85
3. Simon Johnson 75
4. Sarah Khosa 81
5. Mat Jackson 38
6. Nick Roberts 26
7. Isaac Wayne 74
8. Anna Mishima 34
9. Daniel Rose 64
10. Aaron Black 83
11. Jack Mohamed 27
12. Kathrine Bruckner 42
Create a C++ program that has 3 Stacks.
Insert, into the first stack, all the data above (which is the data of student’s names, surnames and the marks they obtain in a particular assessment)
Display the content of the stack on the screen (console)
Then, remove all the students whose surname starts with the alphabets ‘R’, ‘J’ and ‘M’, from the first stack and insert them into the second Stack.
Display the contents of Stack1 and Stack2.
Finally, remove all the students whose marks are less than 50 from both Stack1 and Stack2 and insert them into the Third Stack.
Display the contents of all the 3 Stacks.