public class DrawHalfArrow
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();
"Looking for a Similar Assignment? Order now and Get 10% Discount! Use Code "Newclient"
