anyone can tell me what im doing wrong?
Go to solution
Solved by matin94,
Take a close look at System.out.println(answers); and the number of ints in courseworkmark.
Working for me when I fixed those two lines.
right this iswhat ive done and it worked
public class computemarks
{
public static void main (String [] args)
{
System.out.println("Exam Mark" + "\t" + "Coursework" + "\t" + "Modulemark");
int marksexam [] = {50, 50, 50, 50, 50};
int courseworkmark [] = {50, 50, 50, 50, 50};
int answers [] = new int [marksexam.length];
for (int i = 0; i < answers.length; i++){
answers = marksexam + courseworkmark;
System.out.println(answers);
}
}
}
i added interger i in the print out code with answers
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now