Sign in
Log inSign up

I am making a GPA finder in Java. Can you help with the mistakes in the following program?

avi fried's photo
avi fried
·May 25, 2017
public class HelloWorld{ 
    public static void main(String []args){
        Scanner scanner = new Scanner(System.in);


        int[] scores = new int [10];
        int amountoftest = 0;
        while(amount of test<10)
        {
            scores[amountoftest] = scanner.nextInt();
            amountoftest++;
        }
        int total = 0;
        amountoftest = 0;
        while(amountoftest<10)
        {
            total = total+ scores[amountoftest];
            System.out.print.(scores\10);
        }
    }
}
Hassle-free blogging platform that developers and teams love.
  • Docs by Hashnode
    New
  • Blogs
  • AI Markdown Editor
  • GraphQL APIs
  • Open source Starter-kit

© Hashnode 2024 — LinearBytes Inc.

Privacy PolicyTermsCode of Conduct