Write a function Noodles(), with int parameter minutes, and void return type. Print \"N minutes\"
for each minute in decreasing order, where N is the number of minutes, followed by
\"Done\".End with a newline. The number of minutes is generated from a random number
generator that selects between 1-3 minutes. The seed for the random number generator is input
by the user.
Example output for minutes = 2:
Solution
#include
#include
using namespace std;
void Noodles(int);
int main() {
int minutes = 0;
int seed;
cout<<\"enter random seed\"<<\"\ \";
cin >> seed; // reading seed
srand(seed);
minutes=rand()%3; // random number generation
cout<.
You are requested to write the SQL commands to perform the following.pdf
1. You are requested to write the SQL commands to perform the following operations on the tables
in the CONSTRUCTION database.
TABLES IN THE CONSTRUCTION DATABASE
WORKER Table
Primary key: WORKER_ID
Foreign keys: none
WORKER_ID
WORKER_NAME
HRLY_RATE
SKILL_TYPE
1235
Faraday
12.50
Electric
1412
Nemo
13.75
Plumbing
2920
Garret
10.00
Roofing
3231
Mason
17.40
Framing
- etc.-
ASSIGNMENT Table
Primary key: WK_ID + BLDG_ID + START_DATE
Foreign keys: WK_ID (references the WORKER table)
BLDG_ID (references the BUILDING table)
WK_ID
BLDG_ID
START_DATE
3. 515
789 Oak
Residence
3
1
460
1011 Birch
Office
2
3
- etc.-
Quality Level is a major concern in building construction. List the number of buildings that have
a quality level of 2 or below and the names of employees working at these buildings.
WORKER_ID
WORKER_NAME
HRLY_RATE
SKILL_TYPE
1235
Faraday
12.50
Electric
1412
Nemo
13.75
Plumbing
2920
Garret
10.00
Roofing
3231
Mason
17.40
Framing
- etc.-
Solution
5. BUILDING B, WORKER W
WHERE WORKER.WORKER_ID IN (SELECT WK_ID FROM ASSIGNMENT WHERE
B.BLDG_ID IN
(SELECT BLDG_ID FROM BUILDING WHERE QLTY_LEVEL < 3))
;