/**
* @(#)ArrayMhs .java
*
*
* @author Syafi'i Jauhari
* @version 1.00 2009/6/13
*/
import java.io.*;
public class ArrayMhs
{
private static void mahasiswa()
{
BufferedReader dataIn = new BufferedReader(new InputStreamReader(System.in));
try
{
String nama[] = new String[1000];
int nrp[] = new int[1000];
int abs[] = new int[1000];
int tgs[] = new int[1000];
int uts[] = new int[1000];
int uas[] = new int[1000];
System.out.print("Data Mahasiswa : ");
int dm=Integer.parseInt(dataIn.readLine()) ;
for(int i=0; i
System.out.print("NRP :");
nrp[i] =Integer.parseInt(dataIn.readLine()) ;
System.out.print("Nama :");
nama[i] =dataIn.readLine();
System.out.println("=====================");
System.out.print("\tPresensi : ");
abs[i] =Integer.parseInt(dataIn.readLine()) ;
System.out.print("\tTugas : ");
tgs[i]=Integer.parseInt(dataIn.readLine()) ;
System.out.print("\tUTS : ");
uts[i] =Integer.parseInt(dataIn.readLine()) ;
System.out.print("\tUAS : ");
uas[i] =Integer.parseInt(dataIn.readLine()) ;
double htg1=(abs[i]*10)/100;
double htg2=(tgs[i]*10)/100;
double htg3=(uts[i]*30)/100;
double htg4=(uas[i]*50)/100;
double jumhtg=htg1+htg2+htg3+htg4;
System.out.println("\tNilai Akhir: "+jumhtg);
String ket;
if (jumhtg >= 85)
{
ket="Grade A";
}
else if ((jumhtg>=75) && (jumhtg <=84 ))
{
ket="Grade B";
}
else if ((jumhtg>=65) && (jumhtg <=74 ))
{
ket="Grade C";
}
else if( (jumhtg>=56) && (jumhtg <=64 ) )
{
ket="Grade D";
}
else
{
ket="Grade E";
}
System.out.println("\tGrade : "+ket);
System.out.println("====================");
}
}
catch (Exception e)
{
}
}
public static void main (String[] args)
{
System.out.println("Tugas Array Mahasiswa \nby : Syafi'i Jauhari \nNRP : 07.11.0356 \n S1-C");
mahasiswa();
}
}
Category
Blog Archive
Blog's Teman
Link Download
Kritik Saran
chat
Senin, 15 Juni 2009
Array
Diposting oleh Jouhari di 11:49:00 AM 0 komentar
Label: Arsip java (newbi)
Langganan:
Postingan (Atom)