Using a switch statement, write a program that prompts the user for a numeric code and two operands. The numeric codes of 1, 2, 3, and 4 represents addition, subtraction, multiplication, and division respectively. Before division, your program should check whether the second operand is not zero. If it is, it should display “Division by zero not allowed” to the screen.
Exercise
1. Create and retrieve a cookie named "username" with the value "Patience Zulu". The cookie should expire after 20 days. Check if the cookie is set and display the value of the cookie.
2. Delete the cookie from the previous question.
3. Create the file “People.php” and write a php script that will open a file for writing “WritePeople.txt” file and close the file after writing.
4. Create the file “Cars.php” and write a php script that that will open a file for reading “CarNames.txt” file and close the file after writing.
To qualify for an International Conference for Women in Computing (ICWC) next year in Toronto, Canada a student have got a distinction (a mark greater than 75) in PRG510S, be a female, and below the age of 25. Write a simple program that receives a mark, gender, and age from the keyboard and displays a corresponding message basing on the input.
Sample Run 1:
Mark: 70
Gender: female
Age: 21
Output1: Unfortunately you do not qualify!
Sample Run 2
Mark: 83
Gender: female
Age: 21
Output2: Congratulations! You might be in Toronto, Canada next year for ICWC!
To qualify for a loan award, a student should score between 25 - 100 points and should have been admitted to an accredited institution. write a program that accept points, institution and their gender(f for female an m for male) seperated by spaces and determine if the student qualifies for an award or not. The program should also, print their gender in full and capitalized. Please see sample runs below for appropriete massages/input/output. Use table for program.
Write a program thst calculate and display an employee's weekly salary. if the hours worked are less or equal to 40, the employee is payed N$65.54 per hour, otherwise the employee receives N$80.20 for every hour worked exceeding 40.
Create a do-while loop that asks the user to enter two numbers. The numbers should be added and the sum displayed. The loop should ask the user whether he or she wishes to perform the operation again. If so, the loop should repeat; otherwise it should terminate
Sample Run1
Enter two numbers: 3 15
Do you want another operation: Yes
Enter two numbers: 45 56
Do you want another operation: No
Output1: Sum = 119
Sample Run2
Enter two numbers: 33 150
Do you want another operation: Yes
Enter two numbers: -56 56
Do you want another operation: Yes
Enter two numbers: 58 15
Do you want another operation: Yes
Enter two numbers: 123 87
Do you want another operation: No
Output2: Sum = 466
Write a program that implements PrintFunc and accepts input from user.
Write a program that implements function PrintString and prints your name.