.A hypermarket pays its employees on work-hours basis and by category as shown in the table below. The hypermarket pays “straight-time” for the first 40 hours worked by each employee and pays “time-and-a-half” for all hours worked in excess of 40 hours for only category A1, B2 and M1. No extra pay for other categories. The total work hours for each employee cannot exceed 60 hours per week. The program should request employee’s name, their identification number, the number of hours employees’ work last week and his category. Your program should display all related information about the employee including employee’s gross pay, overtime pay and net salary.
A1 $ 10
B2 $ 12
M1 $ 14
M2 $ 15
M8 $20
do you mean have the radius as input?
This should also be in the beginners section
Look here for printf: http://www.cplusplus.com/reference/clibrary/cstdio/printf/
(i just use cin and cout for things like this)
use cin to store the radius into a double.
make PI a const double.
then printf or cout the stuf you want by typing in the calculations.
1 2 3 4 5 6 7 8 9 10 11 12 13
#include <iostream>
#include <stdio.h>
//I would put PI here, though you can do it in main
int main()
{
//make the double radius
cin >> r; //where r is the double for the radius
//print the calculations here
return 0;
int main()
{
int x, y;
x = 5; //5 is assigned to x
9 = y;
printf("x = %d and y = %d", x, y); //value of x is printed in the first %d, the value of y is printed in the second %d
return 0;
}
output:
x = 5 and y = 0*
(*maybe)
Hopefully this example will help you fix the mistakes in ur program :) Cheers
Hey arahalim, you changed your original post and put in a brand new question. Can you please put ur original post back and move this new problem to a new topic ? Thanks