class Main {
public static void main(String[] args) {
// Write a Java simple application to finish the assignments below
// Assignment #1
// Print your name
System.out.println("Assignment #1");
// Assignment #2
// - Declare a digit variable with 'price' name equal to $45
// - Declare a double type variable with 'discount' name equal to 20% as a decimal
// - Declate a double type variable with 'total' name that calculated the result
// - Print out the result of total due by a customer when purchasing a book that costs $45 with a 20% discount
System.out.println("Assignment #2");
// Assignment #3
// - Write a method that converts 90 degrees Fahrenheit to Celsius
// - Use the following formula: C = (F − 32) × 5/9) to calculate it
// - This time print out the result without declaring any variables
System.out.println("Assignment #3");
// Check the answers and submit your homework by clicking 'Submit' button at top right
}
}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter