Kamis, 20 Februari 2020

Membuat Biodata Mahasiswa Pake Aplikasi TextPad

TI_195410260


Membuat Biodata Mahasiswa
 Pake Aplikasi TextPad



Kode Program :

import java.util.Scanner;
public class Biodata_Mhs {
public static void main(String[] args){
Scanner input = new Scanner(System.in);
String nama, nim, jenisKelamin, alamat, nope, def="Masukan ";
System.out.println("================================");
System.out.println("| INPUT BIODATA MAHASISWA |");
System.out.println("================================");
System.out.print(def + "Nama \t\t: " );
nama = input.nextLine();
System.out.print(def + "NIM \t\t: " );
nim = input.nextLine();
System.out.print(def + "Jenis Kelamin \t: " );
jenisKelamin = input.nextLine();
System.out.print(def + "Alamat \t\t: " );

alamat = input.nextLine();
System.out.print(def + "Nomor Handphone\t: " );
nope = input.nextLine();
System.out.println("");
System.out.println("+------------------------------+");
System.out.println("| Data Biodata Mahasiswa |");
System.out.println("+------------------------------+");
System.out.println("| Nama\t\t: " + nama);
System.out.println("| NIM\t\t: " + nim);
System.out.println("| Jenis Kelamin\t: " + jenisKelamin);
System.out.println("| Alamat\t: " + alamat);
System.out.println("| Nomor HP\t: " + nope);
System.out.println("+-------------------------------+");
}
}


Hasil output dari program di atas ini

Membuat Menghasikan Nilai Mahasiswa Pake Aplikasi TextPad

TI_195410260



Membuat Menghasikan Nilai Mahasiswa 
Pake Aplikasi TextPad



Kode Program : 

import java.util.Scanner;
public class MenghitungNilai{
public static void main(String[] args){
Scanner input = new Scanner(System.in);
float nilai[] = new float[10];
String nama, nim, jurusan, def="Masukan ";
int matkul;
int uts[] = new int[10];
int uas[] = new int[10];
String grade[] = new String[10];

String namamatkul[] = new String[10];
System.out.println("================================");
System.out.println("| MENGHITUNG NILAI MAHASISWA |");
System.out.println("================================");
System.out.print(def + "Nama \t\t: " );
nama = input.nextLine();
System.out.print(def + "NIM \t\t: " );
nim = input.nextLine();
System.out.print(def + "jurusan \t: " );
jurusan = input.nextLine();
System.out.print(def+ "Jumlah mata kuliah = ");
matkul = input.nextInt();
System.out.println("===================================");
for(int i=1 ; i<=matkul ; i++){
System.out.print("Mata Kuliah ke "+(i)+ " : ");
namamatkul[i] = input.next();
System.out.println(def + "nilai UTS :");
uts[i] = input.nextInt();
System.out.println(def + "Nilai UAS : ");
uas[i] = input.nextInt();
nilai[i] = (uts[i]*1/2)+(uas[i]*1/2);
if((nilai[i]>=40)&&(nilai[i]<=60))
grade[i] = "C";
else if ((nilai[i]>=60)&&(nilai[i]<=80))
grade[i] = "B";
else if ((nilai[i]>=80)&&(nilai[i]<=100))
grade[i] = "A";
else
grade[i] = "D";
}
System.out.println("==================================");
System.out.println("Nama = " +nama);
System.out.println("NIM = " +nim);
System.out.println("Mata Kuliah Nilai Grade");
for(int i=1 ; i<=matkul ; i++){
System.out.println(namamatkul[i]+"\t"+nilai[i]+"\t"+grade[i]);
}
}


Hasil output dari program di atas ini