Skip to content

Instantly share code, notes, and snippets.

@MocaaDevv
Created February 10, 2023 20:51
Show Gist options
  • Save MocaaDevv/7ee0efc7848856282c001fce3272754d to your computer and use it in GitHub Desktop.
Save MocaaDevv/7ee0efc7848856282c001fce3272754d to your computer and use it in GitHub Desktop.
Bu program notların alınması, ortalamasının hesaplanması ve harf notunun verilmesi gibi temel işlevleri yerine getirir.
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int quiz, vize, ffinal;
System.out.print("Quiz notunuzu giriniz: ");
quiz = input.nextInt();
System.out.print("Vize notunuzu giriniz: ");
vize = input.nextInt();
System.out.print("Final notunuzu giriniz: ");
ffinal = input.nextInt();
double ortalama = (quiz + vize + ffinal) / 3.0;
System.out.println("Ortalama: " + ortalama);
if (ortalama >= 90) {
System.out.println("A");
} else if (ortalama >= 80) {
System.out.println("B");
} else if (ortalama >= 70) {
System.out.println("C");
} else if (ortalama >= 60) {
System.out.println("D");
} else {
System.out.println("F");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment