
![strcpy s(temp, rec [i].name); strspy s(rec[].name, rec[j].name); strcpy s(rec[j].name, temp); val reclil.salery nec [1] . sal](http://img.homeworklib.com/questions/6d69ff20-3b6f-11eb-ae56-d105d486f5d0.png?x-oss-process=image/resize,w_560)

Editable code:
#include <iostream>
#include <iomanip>
#include <conio.h>
#include <string.h>
using namespace std;
int main()
{
void line();
void star();
int salery, commission;
float comission_value;
char temp[11];
float val;
float val2;
float val3;
struct sal
{
char name[15];
int salery;
float commission;
float comission_value;
}rec[4];
for (int i = 0;i<4;i++)
{
cout << "\nEnter
Name:";
cin>>rec[i].name;
cout << "Enter
salery:";
cin >> rec[i].salery;
cout << "Enter
commission:";
cin >>
rec[i].commission;
rec[i].comission_value =
float(rec[i].salery) * rec[i].commission;
}
for (int i = 0; i < 4; i++)
{
for (int j = i ; j < 4;
j++)
{
if
(strcmp(rec[i].name, rec[j].name) > 0)
{
strcpy_s(temp, rec[i].name);
strcpy_s(rec[i].name, rec[j].name);
strcpy_s(rec[j].name, temp);
val = rec[i].salery;
rec[i].salery = rec[j].salery;
rec[j].salery = val;
val2 = rec[i].commission;
rec[i].commission = rec[j].commission;
rec[j].commission = val2;
val3 = rec[i].comission_value;
rec[i].comission_value =
rec[j].comission_value;
rec[j].comission_value = val3;
}
}
}
cout << "\n\n\n";
line();
cout << setw(15) << "Last Name" <<
setw(20) << "Salery" << setw(15) <<
"Commission%"
<< setw(20) <<
"comission_value\n";
line();
for (int i = 0;i<4;i++)
{
cout << setw(15) <<
rec[i].name << setw(20) <<"NZD\t"<< rec[i].salery
<< setw(15) << rec[i].commission
<<
setw(20) << rec[i].comission_value << endl;
}
line();
cout << endl << endl << endl;
system("pause");
return 0;
}
void line()
{
for (int i = 1;i<41;i++)
cout << "--";
cout << "\n";
}
Use formatting functions to generate a report that display employees last names, basic salary with local...
Salary Lab In this lab you are going to write a time card processor program. Your program will read in a file called salary.txt. This file will include a department name at the top and then a list of names (string) with a set of hours following them. The file I test with could have a different number of employees and a different number of hours. There can be more than 1 department, and at the end of the file...
Q2. Retrieve the names of all employees from the employee table to produce output on CSV format or delimited format with a common delimeter, rather than separete columns. Hint:Put the whole row into a string with a semicolon as the seperator(delimeter) between thecolumns: FORMAT:(fname;minit;lname) Example: EMPLOYEES -------------- James;E;Borg Frank;T;Wong Q3. Write a query to show the employees name from the employee table in this format: first letter of the first name, followed by a dot, a blank, and the full...
This program is intended for C++ A special type of situation, called a controlled break, can occur when processing records of data must temporarily pause because a key value has changed. For example, a control break might occur in a report that contains subtotals for groupings of records. This program requires such a procedure. Sales people at a local car dealership are paid by commission. For every car sale, a sales person earns 30% of the base price or $100,...
Use program control statements in the following exercises: Question 1 . Write pseudocode for the following: • Input a time in seconds. • Convert this time to hours, minutes, and seconds and print the result as shown in the following example: 2 300 seconds converts to 0 hours, 38 minutes, 20 seconds. Question 2. The voting for a company chairperson is recorded by entering the numbers 1 to 5 at the keyboard, depending on which of the five candidates secured...
JAVA Programming . Description: For an unknown number of employees: prompt and receive payroll data; calculate gross pay, taxes owed, and net pay; and display a pay stub. Input : Prompt and receive input from the user for the following: /// Employee’s First and Last Name /// Hours Worked /// Pay Rate /// Overtime Rate Multiplier ** For the Employee’s First and Last Name: Both data items must be read in one prompting into one...
c++ programming
no use of classes
use of functions
pseudo code with comments
Requirement: Provide one application for a business store that sale 2 models of one proo model FA218 and model FA318. The application first provides the menu to allow users can select one of the following tasks per time and when they finish one task, they can continue the application to select other task from the menu until they choose exit. All the output on the screen and...
Use python!!! need to match the execution result that is provided. Part One – Keyword Arguments and Default Values Write an invoice function. The function will generate a simple invoice and will have two required arguments and two keyword arguments. The two required arguments are unitPrice and quantity. The first keyword argument is shipping, and it has a default value of 10. The second keyword argument is handling, and it has a default value of 5. Test it twice from...
Use python!!! need to match the execution result that is provided. Part One – Keyword Arguments and Default Values Write an invoice function. The function will generate a simple invoice and will have two required arguments and two keyword arguments. The two required arguments are unitPrice and quantity. The first keyword argument is shipping, and it has a default value of 10. The second keyword argument is handling, and it has a default value of 5. Test it twice from...
Summarize these pages in your own style and you have to
include in your report some figures highlighting the relation
between these operations.
Basic AGGREGATE functions (Revision) COUNT: returns the number of tuples, which meet the specified condition: SELECT COUNT(DISTINCT Dept) AS Num_Depts FROM subject: SUM: returns the sum of the values in a specified column (i.e. numeric column) SELECT COUNT(*) AS hi_sal, SUM(salary) FROM Lecturer WHERE Salary > 4500 MIN: returns the minimum value in a specified column (numeri...
In C++ Please please help.. Assignment 5 - Payroll Version 1.0 In this assignment you must create and use a struct to hold the general employee information for one employee. Ideally, you should use an array of structs to hold the employee information for all employees. If you choose to declare a separate struct for each employee, I will not deduct any points. However, I strongly recommend that you use an array of structs. Be sure to read through Chapter...