Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

12345678 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

image text in transcribedimage text in transcribed

12345678 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 CECS 2203, Computer Programming I Lab *Fall 2021, Sec. 07 * Date: August 18, 2021 Topic: Lab 1 * File name: lab01.cpp * This program illustrates the use of a void method. * You must analyze the code, add any missing instructions, correct any errors, and execute the program. * * Execute the program two times, using the values * 21 and 22 as input. Make sure to take a screenshot! Name: YOUR NAME HERE, YOUR ID# HERE */ Bint main() { B - // write the appropriate include statement // write the appropriate using statement // Declare a method named procedure which has no return value 77 and requires no parameters B Void Methods B // Write the statement that declares the integer variable // seguir and initializes it to 1 // build a while iteration structure which uses the variable // seguir as sentinel and repeats the code while the value of // seguir is NOT equal to 0. { // call the procedure method cout < < "Enter 0 to finish, or any other number to continue: "; // Fill in the code to read and store the value in seguir mysql> select from dreamhome. Staff; | staffNo | fName | 1Name | position | Mary | Howe | Assistant | David | Ford | Ann | | John | | SA9 | SG14 | SG37 | SG5 | SL21 | SL41 mysql> mysql> mysql> mysql> 6 rows in set (0.00 sec) mysql> mysql> mysql> mysql> mysql> mysql> mysql> mysql> mysql> mysql> mysql> 4. | Supervisor | Mi | Assistant | F Manager | F | White | Manager | Julie | Lee | Assistant I F | Beech Susan | Brand | sex | salary | 1970-02-19 | 9000.00 | B007 | 1958-03-24 | 18000.00 | B003 | 1960-11-10 | 12000.00 | B003 | 1940-06-03 | 24000.00 | B003 | 1945-10-01 | 30000.00 | B005 | 1965-06-13 | 9000.00 | B005 | DOB | branchNo | (15 pts) Create a view vHW2_4_xxxx showing the age and monthly_salary for each staff in dreamhome.Staff table. You need to use timestampdiff function to calculate the age. Your view should have 3 columns and the column names should be (name, age, monthly_salary). The "name" should be first name and last name (in order), and there is a space between first name and last name. The monthly_salary should be formatted with 1 decimal place. The output should be sorted by the age from high to low. V

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Computer Systems A Programmers Perspective

Authors: Randal E. Bryant, David R. O'Hallaron

3rd Global Edition

1292101768, 978-1292101767

More Books

Students also viewed these Programming questions