Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .vscode/settings.json

This file was deleted.

142 changes: 0 additions & 142 deletions README.md

This file was deleted.

Binary file added Screenshot 2024-04-17 034710.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed bin/App.class
Binary file not shown.
5 changes: 0 additions & 5 deletions src/App.java

This file was deleted.

55 changes: 55 additions & 0 deletions task14.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import java.util.Scanner;
public class task14 {
public static void main(String[] args) throws Exception {

System.out.print("whats your name ");
Scanner input = new Scanner(System.in);

String name= input.nextLine();
System.out.println("your name is "+ name);
System.out.println("enter ur attendance for each subject:");
System.out.print("math: ");

int mathat= input.nextInt();
System.out.print("physics: ");

int physat= input.nextInt();
System.out.print("chemistry: ");

int chemat= input.nextInt();
System.out.print("programming: ");

int programmingat= input.nextInt ();
input.nextLine();

System.out.println("Enter an excuse of absence (should have a hospital excuse to make it count): ");
String excuse= input.nextLine();

System.out.println("enter your (GPA out of 5) ");
Double GPA= input.nextDouble();

if(excuse.toLowerCase().contains("hospital")){
mathat++;
physat++;
chemat++;
programmingat++;

if( mathat <44 || physat<42 || chemat<40 || programmingat <47 || GPA<3.5){
System.out.println("you failed ");

}
else{
System.out.println("------------------------------");
System.out.println("student name: "+name);
System.out.println("math Attendance: "+mathat);
System.out.println("physics Attendance: "+physat);
System.out.println("chemistry Attendance: "+chemat);
System.out.println("Programming Attendance: "+programmingat);
System.out.println("GPA: "+GPA);
System.out.println("");
System.out.println("you succeeded");
}
}

}
}