jeudi 29 janvier 2015

String s2 is being skipped. [on hold]


import java.util.Scanner;


public class FinalGradeComputer { public static void main (String[] args) { Scanner keyboard = new Scanner(System.in); String s1, s2, s3, s4, s5, s6; Double g11, g12, g13, g21, g22, g23, g31, g32, g33, g41, g42, g43, g51, g52, g53;



zeb("FINAL GRADE COMPUTER -- beta");
zeb("<..............................>");
zeb2("Subject #1: ");
s1 = keyboard.nextLine();
zeb2("Prelim Grade: ");
g11 = keyboard.nextDouble();
zeb2("MidTerm Grade: ");
g12 = keyboard.nextDouble();
zeb2("Tentative Final Grade: ");
g13 = keyboard.nextDouble();
zeb("<><><><><><><><><><><><><><>");
zeb("Subject: "+(s1.toUpperCase()));
zeb("Final Grade = "+(((g11+g12)+g13)/3));
zeb("<><><><><><><><><><><><><><>");
zeb2("Subject #2: "); //this part is being skipped.
s2 = keyboard.nextLine();
zeb2("Prelim Grade: ");
g21 = keyboard.nextDouble();
zeb2("MidTerm Grade: ");
g22 = keyboard.nextDouble();
zeb2("Tentative Final Grade: ");
g23 = keyboard.nextDouble();
zeb("<><><><><><><><><><><><><><>");
zeb("Subject: "+(s2.toUpperCase()));
zeb("Final Grade = "+(((g21+g22)+g23)/3));
zeb("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");




//zeb((s1.toUpperCase())+" ");

}
static void zeb(String s)
{
System.out.println(s);
}
static void zeb2(String s)
{
System.out.print(s);
}


}





Aucun commentaire:

Enregistrer un commentaire