Examlex

Solved

Create an If Statement That Will Check If the Variable

question 25

Essay

Create an if statement that will check if the variable salesAmt is greater than the constant SALES_QUOTA. If true, create a block statement that will calculate salesAmt * BONUS_PERCENT and store the result in a variable named bonusPay. The block statement will then compute totalPay by adding salesAmt to bonusPay. Outside of the if structure, add a println statement that will output the totalPay value.


Definitions:

Integer

A datatype in programming that represents whole numbers, both positive and negative.

Typedef

A keyword in C and C++ programming languages used to create an alias for existing data types.

Aliases

Alternative names or identifiers that refer to the same entity in a program or system.

Structures

Custom data types in C programming that allow different data types to be stored together.

Related Questions