XYZ is a well-renowned company that pays its salespeople on a commission basis. The salespeople each receive 700 PKR per week plus 9% of their gross sales for that week. For example, a salesperson who sells 4000 PKR worth of chemicals in a week receives 700 plus 9% of 5000 PKR or a total of 1060 PKR. Develop a C++ program that uses a Repetitive Structure (while, for, do-while) to manipulate each salesperson’s gross sales for the week and calculate and displays that salesperson’s earnings.

Answers

Answer 1

Answer:

#include<iostream>

#include<conio.h>

using namespace std;

float calculateGross(float sale)

{

return (sale/100*9) + 700;

}

main()

{

float sale[3] = { 5000,7000,9000}, Totalsale =0;

for(int i=0; i<=2; i++)

{

cout<<"Sales Person "<<i+1<<" Gross Earnings: "<<calculateGross(sale[i])<<" PKR\n";

Totalsale += calculateGross(sale[i]);

}

cout<<"Total Gross Sales Earnings for week: "<<Totalsale<<" PKR\n";

return 0;

}


Related Questions

The layer that represent information as Binary numbers 0s and 1s

information
communication
programming
Hardware

Answers

The layer that represent information as Binary numbers 0s and 1s "Hardware" (Option D)

Why is binary important to computing?

Binary numbers and binary math are used by computers because they considerably simplify their work. It is easier to store or modify the numbers since there are just two choices (0 and 1) for each digit rather than ten.

Hardware components of a computer system, such as transistors, logic gates, and memory circuits, process and store information using binary digits (bits), which can have a value of 0 or 1.

Learn more about Binary Numbers:
https://brainly.com/question/31662989
#SPJ1

Juliet grew up in a small town with limited access to the internet, so she knew how challenging that was. After receiving an email about an organization needing computer programming tutors, Juliet decided to volunteer for the organization, which provides technology for classrooms. Based on this paragraph, what factors can influence a person to donate? Choose two answers.

Answers

Answer:

Based on this paragraph, two factors that can influence a person to donate are:

1. Personal experience or empathy: Juliet's experience growing up in a small town with limited access to the internet may have influenced her decision to volunteer for an organization that provides technology for classrooms.

2. Receiving an email or other form of communication: Juliet's decision to volunteer was based on receiving an email about the organization needing computer programming tutors, which suggests that communication can be a factor in motivating people to donate or volunteer.

Explanation:

Based on this paragraph, two factors that can influence a person to donate are:

1. Personal experience or empathy: Juliet's experience growing up in a small town with limited access to the internet may have influenced her decision to volunteer for an organization that provides technology for classrooms.

2. Receiving an email or other form of communication: Juliet's decision to volunteer was based on receiving an email about the organization needing computer programming tutors, which suggests that communication can be a factor in motivating people to donate or volunteer.

package Unit3_Mod2;


public class ImageExample3 {

public static void main (String[] argv)
{
int[][][] A = {
{
{255,200,0,0}, {255,150,0,0}, {255,100,0,0}, {255,50,0,0},
},
{
{255,0,200,0}, {255,0,150,0}, {255,0,100,0}, {255,50,0,0},
},
{
{255,0,0,200}, {255,0,0,150}, {255,0,0,100}, {255,0,0,50},
},
};

// Add one pixel on each side to give it a "frame"
int[][][] B = frameIt (A);

ImageTool im = new ImageTool ();
im.showImage (B, "test yellow frame");
}

public static int[][][] frameIt (int[][][] A)
{
static int[][][] copy(int[][][] A)
{
int i, j, x;
//declaring a new array with size of original array A
int[][][] ArrayCopy = new int[A.length][][];
//iterate through rows original array
for (i = 0; i < A.length; i++) {
ArrayCopy[i] = new int[A[i].length][];
//Iterate through columns in the array
for (j = 0; j < A[i].length; j++) {
ArrayCopy[i][j] = new int[A[i][j].length];
//iterate through third dimension
for (x = 0; x < A[i][j].length; x++) {
ArrayCopy[i][j][x] = A[i][j][x];
}
}
}
//return the copy of the original array
return ArrayCopy;
}

}


In java, change black frame border to yellow colored frame

Answers

Note that to change the black frame border to a yellow-colored frame in the given Java code, you can modify the frameIt method as follows.

What is the modified code?

public static int[][][] frameIt(int[][][] A) {

   int[][][] ArrayCopy = copy(A); // Create a copy of the original array

   

   // Iterate   over the first and lastrows

   for (int j = 0; j <   A[0].length;j++) {

       ArrayCopy[0][j][0] =255; //   Set red value to 255

       ArrayCopy[0][j][1] = 255; // Set green value to 255

       ArrayCopy[0][j][2] = 0;   // Set blue value to 0

       

       ArrayCopy[A.length - 1][j][0] = 255; // Set red value to 255

       ArrayCopy[A.length - 1][j][1] = 255; // Set green value to 255

       ArrayCopy[A.length - 1][j][2] = 0;   // Set blue value to 0

   }

   

   // Iterate over thefirst and last   columns

   for(int i = 0; i < A.length; i+  +) {

       ArrayCopy[i][0][0] = 255; //Set red value to   255

       ArrayCopy[i][0][1] = 255;   // Set green value to255

       ArrayCopy[i][0][2] = 0;   // Set blue value to 0

       

       ArrayCopy[i][A[i].length -   1][0] = 255;// Set red value to 255

       ArrayCopy[i][A[i].length -   1][1] =255; // Set green value to 255

       ArrayCopy[i][A[i].length - 1][2] = 0;   // Set blue value to 0

   }

   

   return ArrayCopy;

}

Learn more about Java:
https://brainly.com/question/26789430
#SPJ1

Design two classes named Employee and PaySheet to represent employee and PaySheet data as follows: For the Employee class, the data fields are: int empNo; String name; double payRatePerHour, PaySheet[] PaySheet for four weeks (1 month), and Two other data fields of your choice. For the PaySheet class, the data fields are: String weekEndingDate; integer Array of size=5 for the five working days. Entries in this array will be integers from 0-8 where 0 means that the employee did not work that day and a value from 1 to 480 means the number of hours the employee worked in that day. All data fields should be declared as private, and associated getters and setters should be declared in each class. Create a driver class called Main, whose main method instantiates array of Employee objects and write the following methods: 1. A Method called printInfo that receives an array of Employees and prints all information about working days that looks like the following: Emp NO. Week Total Days/hours weekly Payment 1 1 1 2 2 1 2 3 1 2 4/32 5/37 3/12 1/8 3/15 400 500 300 150 450 2. Method called print WarnedEmployees that receives an array of Employees and prints the name of the employee who has a warning. An employee is warned if he is absent for two or more days in two consecutive weeks. 3. A method that receives an array of Objects and sorts unwarned Employees based on TotalPayment (in all weeks) method header must be: public static void sortEmps (Object[] o)​

Answers

You may quickly calculate the wage using the ready-to-use wage salary Sheet template for Excel, Sheets, OpenOffice Calc, and Apple Numbers.

Thus, This payroll document allows you to enter payroll information for many employees as well as a salary slip that is generated in accordance with employment laws in India and contains provident fund and employee allowances.

A salary sheet is a document that contains all the information regarding the payment due to an employee for work completed during a specific time period. It also includes information on things like the employees' base pay, bonuses, deductions, overtime, etc.

The HR document that businesses use to determine employee compensation is the payroll or salary sheet.

Thus, You may quickly calculate the wage using the ready-to-use wage salary Sheet template for Excel, Sheets, OpenOffice Calc, and Apple Numbers.

Learn more about Salary sheet, refer to the link:

https://brainly.com/question/15014451

#SPJ1

Can someone help me out by coding this c into HLA(High Level Assembly)language. I am having so difficulty writting in HLA. That would be appreciated.
program crazy_8s;
#include ("stdlib.hhf");

static
num1: int16;
num2: int16;
num3: int16;
tens: int16;
eight_found: boolean;

begin crazy_8s;

eight_found := false;

while (1)
{
stdout.put("Gimme a number: ");
stdin.get(num1);

tens := num1 / 10 * 10;

if (tens == 8)
{
stdout.put("One of them ends in eight!");
eight_found := true;
break;
}

stdout.put("Gimme a number: ");
stdin.get(num2);

tens := num2 / 10 * 10;

if (tens == 8)
{
stdout.put("One of them ends in eight!");
eight_found := true;
break;
}

stdout.put("Gimme a number: ");
stdin.get(num3);

tens := num3 / 10 * 10;

if (tens == 8)
{
stdout.put("One of them ends in eight!");
eight_found := true;
break;
}

if (!eight_found)
{
stdout.put("Sorry Charlie! You lose the game!");
break;
}
}

end crazy_8s;

Answers

Below is the provided C code translated into HLA (High Level Assembly) language:

program crazy_8s;

#include ("stdlib.hhf")

static

num1: int16;

num2: int16;

num3: int16;

tens: int16;

eight_found: boolean;

begin crazy_8s;

   eight_found := false;

   while (1) {

       stdout.put("Gimme a number: ");

       stdin.gets(num1);

       tens := num1 div 10 * 10;

       if (tens = 8) then

           stdout.put("One of them ends in eight!")

           eight_found := true;

           break;

       endif

       stdout.put("Gimme a number: ");

       stdin.gets(num2);

       tens := num2 div 10 * 10;

       if (tens = 8) then

           stdout.put("One of them ends in eight!")

           eight_found := true;

           break;

       endif

       stdout.put("Gimme a number: ");

       stdin.gets(num3);

       tens := num3 div 10 * 10;

       if (tens = 8) then

           stdout.put("One of them ends in eight!")

           eight_found := true;

           break;

       endif

Thus, this can be the code asked.

For more details regarding HLA, visit:

https://brainly.com/question/13034479

#SPJ1

100 POINTS Can someone help me write a code in python. a program which can test the validity of propositional logic. Remember, a propositional logical statement is invalid should you find any combination of input where the PROPOSITIONAL statements are ALL true, while the CONCLUSION statement is false.

Propositional Statements:

If someone has a rocket, that implies they’re an astronaut.

If someone is an astronaut, that implies they’re highly trained.

If someone is highly trained, that implies they’re educated.

Conclusion Statement:

A person is educated, that implies they have a rocket.

Your output should declare the statement to either be valid or invalid. If it’s invalid, it needs to state which combination of inputs yielded the statement invalid.

Answers

For the code that returns the above output see the attatched.

How does the above code work?

Rocket(), astronaut(), highly trained(), and educated() are the four functions defined in the code that correlate to the propositional propositions. These functions just return the value of the argument passed in.

The test_proposition() method examines all possible input combinations and evaluates the conclusion statement. It returns the exact combination that invalidates the assertion if any combination produces the conclusion statement as false while all propositional statements are true. Otherwise, "Valid" is returned.

Learn more about code at:

https://brainly.com/question/26134656

#SPJ1

Your organization sometimes needs to securely share information with three clients organizations. What will you use so your clients get partial access to resources on your organization’s network?

Answers

Answer:

Personnellement j'utiliserai un logiciel qui permet de paramétrer la limite d'accès aux organisations sur des ressources partagées.

Explanation:

Design two classes named Employee and PaySheet to represent employee and PaySheet data as follows: For the Employee class, the data fields are: int empNo; String name; double payRate PerHour, PaySheet[] PaySheet for four weeks (1 month), and Two other data fields of your choice. For the PaySheet class, the data fields are: String weekEndingDate; integer Array of size=5 for the five working days. Entries in this array will be integers from 0-8 where 0 means that the employee did not work that day and a value from 1 to 480 means the number of hours the employee worked in that day. All data fields should be declared as private, and associated getters and setters should be declared in each class. Create a driver class called Main, whose main method instantiates array of Employee objects and write the following methods: 1. A Method called printInfo that receives an array of Employees and prints all information about working days that looks like the following: Emp NO. Week Total Days/hours weekly Payment 1 1 1 2 2 1 2312 2 4/32 5/37 3/12 1/8 3/15 400 500 300 150 450 2. Method called print WarnedEmployees that receives an array of Employees and prints the name of the employee who has a warning. An employee is warned if he is absent for two or more days in two consecutive weeks. 3. A method that receives an array of Objects and sorts unwarned Employees based on TotalPayment (in all weeks) method header must be: public static void sortEmps (Object[] o)​

Answers

A class serves as a model for generating objects through code. Objects are characterized by their member variables and their corresponding behavior.  The code is given below.

What is the class code?

The term "class" in Python is generated using the keyword "class". A new instance is generated through the usage of the class's constructor.

The function that is named "printWarnedEmployees" is one that often accepts an array containing objects of type "Employee" and show forth the name of any employee who has received a warning. If an employee is absent for two or more days in two consecutive weeks, they will be given a warning.

Learn more about class code from

https://brainly.com/question/17544466

#SPJ1

Select the correct answer from each drop-down menu.
Which two components help input data in a computer and select options from the screen, respectively?
✓inputs data into computers in the form of text, numbers, and commands. However, a
commands from the screen.
A
Reset
Next
✓selects options and

Answers

Which two components help input data in a computer and select options from the screen, respectively?

✓ Keyboard inputs data into computers in the form of text, numbers, and commands. However, a

✓ Mouse selects options and commands from the screen.

A

Reset

Next

To know more about input data refer here

https://brainly.com/question/30256586#

#SPJ11

21
Select the correct answer.
Which task occurs just before the maintenance phase?
O A reviewing prerequisites
B.
final reviewing and deploying the product
C. training end users to operate the product
D.
site surveying
O E reviewing all manuals and plans
Edmentum/Plato

Answers

The task, final reviewing and deploying the product occurs just before the maintenance phase. The correct option is B.

The task that takes place just before the maintenance phase is the last review and deployment of the product.

At this step, the software or product is thoroughly examined to make sure it complies with all the prerequisites and quality standards. Before the product is deployed or made available to end users, any outstanding problems or faults are addressed and fixed.

Final testing, user acceptability testing, and preparing the product for deployment in the production environment are additional tasks included in this phase.

The product can be made available for usage by the intended end users after the final review is finished and it is determined that it is ready.

Thus, the correct option is B.

For more details regarding testing, visit:

https://brainly.com/question/31941684

#SPJ1

It is a system that is used to solve problems and interact with the environment

Variable
Computing System
Network
Computer

Answers

The term that encompasses asystem used to solve problems and interact with the environment is a "computing system."

Why is a computing system important?

Technology has improved to the point where computer systems are employed by every sector to  boost efficiency and remain ahead of their competition.

"A computing system is often made up of hardware components (such as computers and server  s) and software components (such as operating systems and apps) that collaborate to execute tasks, analyze data, and interface with people or other systems.

 It can include a variety ofdevices, networks, and computer resources to facilitate problem solving, data processing, communication, and other computational  operations.

Learn more about computer at:

https://brainly.com/question/29892306

#SPJ1

Which of the following queries can have a fully Meets result?

Answers

Answer: we need the awnser key

Explanation:

Other Questions
What is "hot cognition"?a.The notion that juveniles are more likely to exercise poor judgment as a result of peer pressure or when facing stressful situationsb.Neuroscience research on brain imaging on youthsc.The notion that adolescents intelligence and ability to reason is similar to that of adults by the age of 16d.Both a and c, but not b which of these scenarios would cause the u.s. short-run aggregate supply curve to shift to the left? which would not?Foreign buyers experience a decrease in income. Many workers signed contracts last year assuming 19 future inflation. This year, it was revealed that current inflation is nearly 5%. A mysterious disease kills off half of the nation's corn crop. Most workers signed contracts last year assuming 3% future inflation. This year, it was revealed that current inflation is only 196. After the FDA announces a new set of regulations for next year, consumers expect all grocery prices to fall. which of the following statistical distributions is used for the test for the slope of the regression equation?a. z statisticb. F statisticc. t statisticd. statistic Lack of alpha1-antitrypsin in emphysema causes:A. chronic mucus secretion and airway fibrosis.B. destruction of alveolar septa and loss of elastic recoil.C. pulmonary edema and increased alveolar compliance.D. bronchoconstriction and airway edema. A bug begins to crawl up a vertical wire at time t = 0. The velocity v of the bug at time t, 0 < t < 8, is given by the function whose graph is shown behind this text. At what value of t does the bug change direction? a. 2b. 4c. 6.5d. 7 f the length of the connecting lines in the tree is a rough measure of time, which of the following subunits was the last to diverge from the primordial globin?beta and deltagamma-1 and epsilonalpha and thetamu senator joseph mccarthy went too far when he quizlet who is the creator of the world wide web quizlet The average teacher's salary in New Jersey (ranked first among states) is $52,174. Suppose that the distribution is normal with standard deviation equal to $7500. a. What is the probability that a randomly selected teacher makes less than $50,000 a year?If we sample 100 teachers' salaries, what is the probability that the sample mean is less than $50,000? In UNIX determine if True or False_____ $cwdThe shell variable that contains the name of the working directory._____ $historyThe shell variable that specifies the number of commands that will be saved from the history list when you log out, so that your history continues across login sessions._____ $filecThe shell variable that when set allows you to enter a partial filename on the command line and then press or to cause the shell to complete the filename._____ $noclobberThe shell variable that prevents you from accidentally overwriting a file when you redirect output._____ $PATHThe shell variable that controls the search path for executables. Project#5 - Two-dimensional array operations: Movie Ratings program**You have recently collected reviews from four movie reviewers where the reviewers are numbered 1-4. Each reviewer has rated six movies where the movies are numbered 100-105. The ratings range from 1 (terrible) to 5 (excellent). Note: To store the sample data below in a 2D array the reviewer numbers must be mapped to 0-3 (row indexes) and the movie ID%u2019s must be mapped to 0-5 (column indexes). The movie rating does not include data for unrated movies and only includes values related to the rating range provided. A sample data set with movie review ratings are shown in the following table:100 101 102 103 104 1051 3 1 5 2 1 52 4 2 1 4 2 43 3 1 2 4 4 14 5 1 4 2 4 2Based on this information your program should allow the user a menu of 6 options. The options are:Display current movie ratings.Show the average rating for each movie.Show a reviewers highest rated movie. (enter reviewer# 1-4)*Show a movies lowest rating. (enter movie# 100-105)Enter new ratings (1-5) for movie# 100-105 for four reviewers.Exit the program. I need help on coming up on followership conclusion idea? demonstrations work well, according to the social learning theory, because they allow the learner to explore the perceptual motor landscape. select one:truefalse One method of preventing routing loops is to not send information about a route back to the router from which the information came. What is this technique called. Hold downs use triggered updates to help prevent routing loops by letting routers know of changes in the network. a four way valve is used with which specific operation pre-eclampsia can pose a health danger to the Q4Considering only the values of 3 for which the expression is defined, simplify the following expression. cos(-3) tan 3 sec cot B What is the wavelength of the photon emitted by a lithium Li2+ ion when it undergoes a transition from the n = 3 state to the n = 1 state? (The atomic number for lithium is 3) Match the following descriptions to the appropriate automated sales force tool Tool that enables quick decision making, better customer service, ... what position should the swallowed-poison victim be placed in?