Answered step by step
Verified Expert Solution
Question
1 Approved Answer
when i print to the cosole the columns match up but when i print to a file the columns are not aligned im not sure
when i print to the cosole the columns match up but when i print to a file the columns are not aligned im not sure how to align the titles with the data
31/Jan/2020 proft.java import import java.util. java.io. public class TvoIPEDGE public static void main(Strin 11 aras throws IOException le Elle File out ney File (vodata.txt") = new File("tvolbaveoll.txt" ) file); Scanner input new Scanner int TOY = input. nextInt (); int col 7: int 11 arv = new introv 1 Icolli for (TOM = 0; TOV ary.length: TOV ++) for (int column = 0: column arv (row).length: colum ary (row][colu ] - impue. nextInt () -)! ) input. close(); Printwriter out = new Printiriter (outra out. printin ("Employee trate Total Hours workedtGross Pavit.Ne Pay" for (int i = 0; i rov: i ++) int total = 0 for (int i = 0: cali +) { total + ay lill): 907 double netPay = total 7.5 double groPay total 7.5: out . printf (i +"\\187.50\" Grossav. netPay ) + total + "\s\t\\\t - 1.24 - "\t\t - 3.2f , out P. close(); + 5 + 6 H + N 9 31/Jan/2020 proft.java import import java.util. java.io. public class TvoIPEDGE public static void main(Strin 11 aras throws IOException le Elle File out ney File (vodata.txt") = new File("tvolbaveoll.txt" ) file); Scanner input new Scanner int TOY = input. nextInt (); int col 7: int 11 arv = new introv 1 Icolli for (TOM = 0; TOV ary.length: TOV ++) for (int column = 0: column arv (row).length: colum ary (row][colu ] - impue. nextInt () -)! ) input. close(); Printwriter out = new Printiriter (outra out. printin ("Employee trate Total Hours workedtGross Pavit.Ne Pay" for (int i = 0; i rov: i ++) int total = 0 for (int i = 0: cali +) { total + ay lill): 907 double netPay = total 7.5 double groPay total 7.5: out . printf (i +"\\187.50\" Grossav. netPay ) + total + "\s\t\\\t - 1.24 - "\t\t - 3.2f , out P. close(); + 5 + 6 H + N 9Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started