Java formatting issue -


for assignment told need format output in columns instead of top bottom in image...

guide:

guide

here code outputs downwards , not in columns

public void displaystudentanswers(char[][] responses, char[] goodanswers, int numstudents, int numquestions) {     //number wrong keep track of how many each student got wrong can calculate percent later     double[] numwrong;     numwrong = new double[numstudents];      for(int i=0; i<numstudents; i++)     {         system.out.printf("student %d%n", i+1);         for(int j = 0; j<numquestions; j++)         {             if(responses[i][j] == goodanswers[j])             {                 system.out.printf("%2d) %c%n", j+1 , responses[i][j]);             }             else             {                 system.out.printf("%2d) %c (%c)%n", j+1 , responses[i][j], goodanswers[j]);                 numwrong[i]++;             }          }     } 

i new java programming , appreciate help!


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -