Java program
public class JavaJoeWeek{ public static void main(String[] args){ double money=200.0; double paintarea=0.0; //paintarea iniially set to zero for (int x=1; x<=7; x++){ // This section reveals the range of x and that x is incremental if (x==1) { //if x is equal to one program enters into one conditional sphere System.out.println("Monday"); //outputs monday under the condition if x is 1 double.shoes=30; //states the price of shoes double.total=30*1.15; //calculates hte price of the shoes after tax System.out.println("The amount Joe paid for the shoes is" + total); //shows the amount Joe paid for the shoes money=money-total; //money as passed down from the public static void main System.out.println("The amount Joe has left for himself is"+ money); } else if (x==2) { System.out.println("Tuesday"); paintarea=12*7.0; System.out.println("The area Joe paints on Tuesday is" + paintarea);} else if (x==3) { System.out.println("Wednesday"); double.paint=1.13; double.total=paint*paintarea; money=money-total; System.out.println("The total money that Joe has left for himself" + money);} else if (x==4) { System.out.println("Thursday"); double.total=36.40; double.gas=0.45; double liters=total/gas; System.out.println("The number of liters Joe refilled his gas tank is" + liters); money=money-total; System.out.println("The amount of money Joe has left for himself is" + money);} else if (x==5) { System.out.println("Saturday"); double.total=23.0; System.out.println("The money he donated for a charity is" + total); money=money-charity; System.out.println("The amount of money he left for himself is" + money);} else if (X==6) { System.out.println("Sunday"); } } } } }
@nevermind_justschool
What about it?
Join our real-time social learning platform and learn together with your friends!