Best writers. Best papers. Let professionals take care of your academic papers

Order a similar paper and get 15% discount on your first order with us
Use the following coupon "FIRST15"
ORDER NOW

code

Question

Hi Guys,Last part (5) of code does not working, please can you fix it. Please, code the

question.

import java.util.Scanner;

public class DrawHalfArrow {

  public static void main(String[] args) {

     Scanner scnr = new Scanner(System.in);

     int arrowBaseHeight = 0;

     int arrowBaseWidth = 0;

     int arrowHeadWidth = 0;

     int i = 0;

     System.out.println(“Enter arrow base height: “);

     arrowBaseHeight = scnr.nextInt();

     System.out.println(“Enter arrow base width: “);

     arrowBaseWidth = scnr.nextInt();

     System.out.println(“Enter arrow head width: “);

     arrowHeadWidth = scnr.nextInt();

     String ast = “”;

     for (int x = 1; x <= arrowBaseWidth; x++){

        ast += “*”;

     }

     for (i = 1; i <= arrowBaseHeight; ++i){

        System.out.println(ast);

     }

     int tempHeadWidth = arrowHeadWidth;

     for (int y = 1; y <= arrowHeadWidth; y++){

        for (int z = tempHeadWidth; z > 0; z–){

           System.out.print(“*”);

        }

        tempHeadWidth -= 1;

        System.out.println();

     }

     return;

  }

Untitled1.png

}

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"