Write a Java program that calculates area and perimeter of square in a function. Name Calculate Area and Calculate Perimeter respectively. The values that will be passed to the functions will be first input by user.
Write a Java program that calculates area and perimeter of square in a function. Name Calculate Area and Calculate Perimeter respectively. Pass the values to the function from main () while calling functions
Write a Java program that implements a function Check Even Odd that checks that a number input by user is even or odd
Write a Java program to print odd numbers less than 20 in a function.
Make a Calculator having all the main functions using Math’s functions.
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!