Create an application that calculates and displays two raise amounts, which are based on an employee’s current salary. The current salary will be entered by the user. The two raise rates are 5% and 8%. In addition to the raise amounts, the application should also calculate and display the employee’s new salaries. Include a button in the interface that the user can click to clear the user input and calculated results from the screen.
Sue sells day old chicks after they hatch from eggs. She buys the eggs at a fixed cost of 11c per egg. She determined that she spends R1.10 on electricity and other costs per egg to hatch it. she needs a program to calculate the sales price of the chicks. she would like to make 15% profit per chick. Number of chicks 5 .The program must accept the number of chicks that a client wants and then calculate and display the sales price.
write a program that accepts as input the mass (in grams) and density (in grams per cubic centimeters), and ooutputs the volume of the object using the formula: density = mass / volume.
The following mathematical expression is used to find the number of penny stamps one gets if one inserts dollars number of dollars in a stamp vending machine that returns the change in penny stamps. Replace the given mathematical expression by a simpler expression that gives the same value.
double amount1 = 19.35;
double amount2 = 19.95;
What are values of variables a and b after the following assignments?
int a = amount2;
int b = amount2 + 0.5;
Read the following declarations of variables & constants and determine which of them are syntactically, semantically and stylistically correct. Your answer should be either Correct or Incorrect.
1. int cat = ”Tazo”;
2. int toucans = toucans + 1; 3. hamsters = 5;
4. char ch = ’ab’;
5. bool done = ”false”;
Create an application that calculates and display two raise amounts, which are based on an employee's current salary. The current salary will be entered by the user. The two raise rates are 5% and 8%. In addition to the raise amounts, the application should also calculate and display the employee's new salaries. Include a button in the interface that the user can click to clear the user input and calculated results from the screen.
A phone number, such as (212) 767-8900, can be thought of as having three parts:
the area code (212), the exchange (767), and the number (8900). Write a program
that uses a structure to store these three parts of a phone number separately. Call
the structure phone. Create two structure variables of type phone. Initialize one,
and have the user input a number for the other one. Then display both numbers.
The interchange might look like this:
Enter your area code, exchange, and number: 415 555 1212
My number is (212) 767-8900
Your number is (415) 555-1212
Create a structure called Volume that uses three variables of type Distance to
model the volume of a room. Initialize a variable of type Volume to specific
dimensions, then calculate the volume it represents, and print out the result. To
calculate the volume, convert each dimension from a Distance variable to a
variable of type float representing feet and fractions of a foot, and then multiply the
resulting three numbers.
(Create a structure called time. Its three members, all type int, should be called
hours, minutes, and seconds. Write a program that prompts the user to enter a
time value in hours, minutes, and seconds. The program should then store the time
in a variable of type struct time, and finally print out the total number of seconds.
Use the time structure from above and write a program that obtains two
time values from the user, stores them in struct time variables, converts each one)
to seconds (type int), adds these quantities, converts the result back to hours-
minutes- seconds, stores the result in a time structure, and finally displays the
result in 12:59:59 format
Create a structure called time. Its three members, all type int, should be called
hours, minutes, and seconds. Write a program that prompts the user to enter a
time value in hours, minutes, and seconds. The program should then store the time
in a variable of type struct time, and finally print out the total number of seconds.