- Messages
- 11
- Reaction score
- 0
- Points
- 16
How to create Grades Computation using java. With if else condition.?
Most of our features and services are available only to members, so we encourage you to login or register a new account. Registration is free, fast and simple. You only need to provide a valid email. Being a member you'll gain access to all member forums and features, post a message to ask question or provide answer, and share or find resources related to mobile phones, tablets, computers, game consoles, and multimedia.
All that and more, so what are you waiting for, click the register button and join us now! Ito ang website na ginawa ng pinoy para sa pinoy!
How to create Grades Computation using java. With if else condition.?
I triEd n po lahat ng post niyo..proh ayw nmn po magrun. E2 po kc uNg codes n ginawa ko.
import java.io.*;
public class ComputationGrade
{
private static BufferedReader num = new BufferedReader(new InputStreamReader(System.in));
public static void main(String[] args) throws IOException
{
System.out.println("Enter QUIZ1");
double Q1 = Integer.parseInt(num.readLine());
System.out.println("Enter QUIZ2");
double Q2 = Integer.parseInt(num.readLine());
System.out.println("Enter TOTAL QUIZ");
double TQ = Integer.parseInt(num.readLine());
double W = Q1+Q2;
double TOQ = (W/2)*35/100;
System.out.println("Enter HOMEWORK");
double HW = Integer.parseInt(num.readLine());
System.out.println("Enter SEATWORK");
double SW= Integer.parseInt(num.readLine());
System.out.println("Enter ATTENDANCE");
double ATT = Integer.parseInt(num.readLine());
System.out.println("Enter RECITATION");
double REC = Integer.parseInt(num.readLine());
double A= HW+SW+ATT+REC;
double TCS = (A/4)*.15;
{
System.out.println("Enter TOTAL EXAM");
double TE = Integer.parseInt(num.readLine());
double TotQ = ((Q1+Q2)*.35);
double CS = ((HW+SW+ATT+REC)*.15);
double ME = (TE*.50);
double PLE = (TQ+TCS+TE);
System.out.println("The result is :"+PLE);
System.out.println("Enter MACHINE PROBLEM 1");
int MP1 = Integer.parseInt(num.readLine());
System.out.println("Enter MACHINE PROBLEM 2");
int MP2 = Integer.parseInt(num.readLine());
System.out.println("Enter LAB COMPILATION");
int C = Integer.parseInt(num.readLine());
System.out.println("Enter LAB TOTAL QUIZ");
int LTQ = Integer.parseInt(num.readLine());
System.out.println("Enter LAB TOTAL EXAM");
int LTE = Integer.parseInt(num.readLine());
System.out.println("Enter LAB SEATWORK");
int LSW= Integer.parseInt(num.readLine());
System.out.println("Enter LAB ATTENDANCE");
int LATT = Integer.parseInt(num.readLine());
System.out.println("Enter LAB TOTAL CLASS STANDING");
int LTCS = Integer.parseInt(num.readLine());
System.out.println("Enter LAB TOTAL MACHINE PROBLEM");
int TMP = Integer.parseInt(num.readLine());
double MP = (MP1+MP2)*.40;
double CLS = (C+SW+ATT)*20;
double MEX = (LTE*.40);
double PLEX = (TMP+TCS+TE);
System.out.println("The result is :"+ PLEX);
if(PLEX >= 75){
System.out.print("Pass!");
}
else{
System.out.print("Enroll next sem!");
}
}
}
}
Bakit DOUBLE pero sa integer mo pinarse??? Tsaka ano yung total exam and total quiz dapat wala na ata yun.
pano ka matututo nyan kong di mo alam kong pano mag hanap ng error ts..concern lang..