Java Conditional Logic, Loops & Dues Calculator
Classified in Computers
Written on in
English with a size of 3.27 KB
Java Membership Dues Calculator Example
Below is a corrected and formatted Java example that demonstrates conditionals, a switch, and loops. All original content has been preserved and corrected for spelling, grammar, and capitalization.
import java.util.Scanner;
public class DuesCalculator {
public static void main(String[] args) {
// TODO: application logic here
// 1
char standing;
double gpa = 0, dues = 0;
// 2
Scanner keyboard = new Scanner(System.in); // import java.util.Scanner
System.out.print("Enter your class standing: ");
standing = keyboard.nextLine().charAt(0);
System.out.println("Enter your GPA:");
gpa = keyboard.nextDouble();
// System.... Continue reading "Java Conditional Logic, Loops & Dues Calculator" »