Answer:
<em>C++.</em>
#include <iostream>
using namespace std;
////////////////////////////////////////////////////////////////
int main() {
int weekly_hours = 0;
int hourly_rate;
float gross_pay = 0;
cout<<"Enter weekly hours worked: ";
cin>>weekly_hours;
cout<<"Enter hourly rate: ";
cin>>hourly_rate;
cout<<endl;
////////////////////////////////////////////////
if (weekly_hours > 40) {
gross_pay = (weekly_hours*hourly_rate) + ((weekly_hours*hourly_rate)*0.5);
}
else
gross_pay = weekly_hours*hourly_rate;
cout<<"Weekly gross pay: $"<<gross_pay;
////////////////////////////////////////////////
return 0;
}
Answer:
The Anonymous Block will be:
1 DECLARE
2
3 lv_grade_row grade%rowtype;
4 lv_gr_avg grade.gr_t1%type;
5 lv_std_name varchar2(80);
6 cursor cursor_grade is select * from grade;
7
8 BEGIN
9
10 select avg(gr_t1) INTO lv_gr_avg from grade;
11 open cursor_grade;
12 fetch cursor_grade INTO lv_grade_row;
13
14 while cursor_grade%found loop
15
16 if
17 lv_grade_row.gr_t1>lv_gr_avg then lv_std_name :=
lv_grade_row.std_fname|| ' ' ||lv_grade_row.std_lname|| ' ' ||
lv_grade_row.gr_t1;
18 dbms_output.put_line(lv_std_name);
19
20 end if;
21 fetch cursor_grade into lv_grade_row;
22
Explanation:
I had 7 assignments all do at the same time for different classes. They were all incredibly tedious so I strategized and did the assignments that I knew well first, then completed the others. I evaluated the pros and cons of this strategy and decided that if I had done the harder ones first it would have taken more time and I would have been too stressed to complete the others. I hope that helps!