by @Akmal Daud Fork
 
id_4b276688_e691_4201_a29e_318b19267f00 Begin id_db4dd50c_8a12_4a7e_bc78_8f412351b4bc Avg id_4b276688_e691_4201_a29e_318b19267f00:s->id_db4dd50c_8a12_4a7e_bc78_8f412351b4bc:n id_d51df1cd_2c61_4690_8be1_e5e4f9b5d1aa marks id_db4dd50c_8a12_4a7e_bc78_8f412351b4bc:s->id_d51df1cd_2c61_4690_8be1_e5e4f9b5d1aa:n id_d744ce6a_eb74_4e5c_840b_d6041535c1aa bilUser = 1 id_d51df1cd_2c61_4690_8be1_e5e4f9b5d1aa:s->id_d744ce6a_eb74_4e5c_840b_d6041535c1aa:n id_7dcb78de_6c0e_4947_bffc_3f3a28fa5c20 sum = 0 id_d744ce6a_eb74_4e5c_840b_d6041535c1aa:s->id_7dcb78de_6c0e_4947_bffc_3f3a28fa5c20:n id_48343dc5_4fec_4aec_8ed1_40a806709b05 bilUser <= 5 id_7dcb78de_6c0e_4947_bffc_3f3a28fa5c20:s->id_48343dc5_4fec_4aec_8ed1_40a806709b05:n true_dummy_up_id_48343dc5_4fec_4aec_8ed1_40a806709b05 id_48343dc5_4fec_4aec_8ed1_40a806709b05:e->true_dummy_up_id_48343dc5_4fec_4aec_8ed1_40a806709b05 true false_dummy_up_id_48343dc5_4fec_4aec_8ed1_40a806709b05 id_48343dc5_4fec_4aec_8ed1_40a806709b05:w->false_dummy_up_id_48343dc5_4fec_4aec_8ed1_40a806709b05 false id_619e5b24_ff6b_448a_b567_511df7f39595 marks true_dummy_up_id_48343dc5_4fec_4aec_8ed1_40a806709b05->id_619e5b24_ff6b_448a_b567_511df7f39595:n false_dummy_down_id_48343dc5_4fec_4aec_8ed1_40a806709b05 false_dummy_up_id_48343dc5_4fec_4aec_8ed1_40a806709b05->false_dummy_down_id_48343dc5_4fec_4aec_8ed1_40a806709b05 id_c80f4df2_930e_4eea_8762_e50193f66b92 sum = sum+marks id_619e5b24_ff6b_448a_b567_511df7f39595:s->id_c80f4df2_930e_4eea_8762_e50193f66b92:n id_be086337_761b_4984_8282_17e04c90acd1 bilUser = bilUser + 1 id_c80f4df2_930e_4eea_8762_e50193f66b92:s->id_be086337_761b_4984_8282_17e04c90acd1:n true_dummy_down_id_48343dc5_4fec_4aec_8ed1_40a806709b05 id_be086337_761b_4984_8282_17e04c90acd1:s->true_dummy_down_id_48343dc5_4fec_4aec_8ed1_40a806709b05:n true_dummy_down_left_id_48343dc5_4fec_4aec_8ed1_40a806709b05 true_dummy_down_id_48343dc5_4fec_4aec_8ed1_40a806709b05->true_dummy_down_left_id_48343dc5_4fec_4aec_8ed1_40a806709b05 true_dummy_down_left_id_48343dc5_4fec_4aec_8ed1_40a806709b05->id_48343dc5_4fec_4aec_8ed1_40a806709b05:s end_dummy_down_id_48343dc5_4fec_4aec_8ed1_40a806709b05 false_dummy_down_id_48343dc5_4fec_4aec_8ed1_40a806709b05->end_dummy_down_id_48343dc5_4fec_4aec_8ed1_40a806709b05 id_72ce5155_5692_4052_8f97_ae9807fa4d43 Avg = sum/5 end_dummy_down_id_48343dc5_4fec_4aec_8ed1_40a806709b05->id_72ce5155_5692_4052_8f97_ae9807fa4d43 id_f7ec19f6_7c10_41d6_bd7b_c31733fec850 Avg id_72ce5155_5692_4052_8f97_ae9807fa4d43:s->id_f7ec19f6_7c10_41d6_bd7b_c31733fec850:n id_ff7265b2_e1a5_458a_84c7_b2c2130a43ce End id_f7ec19f6_7c10_41d6_bd7b_c31733fec850:s->id_ff7265b2_e1a5_458a_84c7_b2c2130a43ce:n
import java.util.*;

public class loopAvg {
  static Scanner scanner = new Scanner(System.in);

  public static void main(String args[]) {
    double Avg = 0;
    double marks = 0;
    int bilUser = 1;
    double sum = 0;
    while (bilUser <= 5) {
      System.out.print("sila masukkan marks");
      marks = scanner.nextDouble();
      sum = sum + marks;
      bilUser = bilUser + 1;
    }
    Avg = sum / 5;
    System.out.println(Avg);
  }
}