Answer:
int calculate_cost(int quantity) {
double cost = 0;
if (quantity <= 20)
cost = quantity * 23.45;
else if (quantity >= 21 && quantity <= 100)
cost = quantity * 21.11;
else if (quantity > 100)
cost = quantity * 18.75;
return cost;
}
Explanation:
Create a function called calculate_cost that takes one parameter, quantity
Initialize the cost as 0
Check the quantity using if else structure. Depending on the quantity passed, calculate the cost. For example, if the quantity is 10, the cost will be $234.5
Return the cost
Answer:
mbnlkgjhituyhklcjvjhklhur
Explanation:
hjiuyotgjfhkjmrti
The two major SAS steps are data and proc.
SAS programming structure is based on two essential steps, Data and Proc.
1. The DATA step:
This involves collecting and uploading the essential data to the program memory. It is used to update, modify and edit the data in case of any errors once it has been added to a dataset. New datasets can be created from existing ones by updating, editing, and/or merging them. at the end of this step, SAS data sets are created.
2. The PROC step:
This step processes and analyses the data collected into datasets in the previous step. it is used to perform specific functions on the data. at the end of the proc step, a result or report is produced.
In a SAS code, each line of code should begin either with a DATA or PROC step.
<u>While the other options are incorrect because: </u>
<u />
- Analysis: analysis is done in the PROC step.
- Content: Data or content is collected in the DATA step.
- Stat: a stat function acquires the status information regarding a specific file. Functions are performed on the datasets in the PROC step.
- Run: This command is used to execute a code.
- Import: Datasets are created by importing data from other datasets and outside.
- Print: the report produced at the end of the PROC step can be printed as a hard copy.
You can learn more about SAS at
brainly.com/question/13615203
#SPJ4
Answer:
C# and Java
Explanation:
Compiler can be regarded as a program that helps in transforming a source code( source program) to another program knowns as machine code. Some of the programming languages that needs a compiler are C# and Java. The compiler will collect the the set of instructions of the new program that was written using high level language and translate it into machine language.