- 1

What is wrong

Scanner in = new Scanner (System.in); System.out.println("enter your name!: "+"\n !ادخل اسمك: "); String name =in.next(); System.out.println("enter your birthday"+"\n ادخل تاريخ ميلاديك"); int Bday = in.nextInt(); System.out.println("enter your major: "+"\n ادخل تخصصك"); String major = in.next(); System.out.println("enter the numbers of your courses: "+"\nادخل عدد مقرراتك الدراسيه: "); int n = in.nextInt(); System.out.println("write your courses this smester: "+"\n اكتب مقررات الدراسه هذا الترم"); String[] courese = new String[n]; for(int i = 1;i<=courese.length;i++){ courese[i+1] = in.next(); } System.out.println("enter your grades in these courses :"+"\n ادخل درجتك عند كل ماده:"); int sum = 0; for(int j = 1 ; j<=n ; j++){ int grades = in.nextInt(); sum+=grades; } if(sum>300){ System.out.println("you are pas

31st Jan 2021, 7:26 PM
x _6rd
x _6rd - avatar
1 ответ