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;
}
}
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"
![](https://sp-ao.shortpixel.ai/client/to_webp,q_glossy,ret_img,w_320,h_80/http://academicheroes.com/wp-content/uploads/2018/09/order_now.png)