Premium Only Content

INPUT AND FORMATTED OUTPUT: RIGHT-FACING ARROW | USING NETBEANS | Angel Palacios
#InputAndFormattedOutputRightFacingArrow
LAB: INPUT AND FORMATTED OUTPUT: RIGHT-FACING ARROW
Given two input integers for an arrowhead and arrow body, print a right-facing arrow.
Ex: If the input is:
0 1
the output is:
1
11
00000111
000001111
00000111
11
1
Chapters:
0:00 Intro
0:11 Right-facing arrow
5:37 Output (Results)
SOLUTION: ** LabProgram.java **
import java.util.Scanner;
public class LabProgram {
public static void main(String[] args) {
Scanner scnr = new Scanner(System.in);
int baseChar;
int headChar;
baseChar = scnr.nextInt();
headChar = scnr.nextInt();
System.out.print(" ");
System.out.println(headChar);
System.out.print(" ");
System.out.print(headChar);
System.out.println(headChar);
System.out.print(baseChar);
System.out.print(baseChar);
System.out.print(baseChar);
System.out.print(baseChar);
System.out.print(baseChar);
System.out.print(headChar);
System.out.print(headChar);
System.out.println(headChar);
System.out.print(baseChar);
System.out.print(baseChar);
System.out.print(baseChar);
System.out.print(baseChar);
System.out.print(baseChar);
System.out.print(headChar);
System.out.print(headChar);
System.out.print(headChar);
System.out.println(headChar);
System.out.print(baseChar);
System.out.print(baseChar);
System.out.print(baseChar);
System.out.print(baseChar);
System.out.print(baseChar);
System.out.print(headChar);
System.out.print(headChar);
System.out.println(headChar);
System.out.print(" ");
System.out.print(headChar);
System.out.println(headChar);
System.out.print(" ");
System.out.println(headChar);
}
}
Good luck and I hope this helps!
Thank you all for watching!
Music in this video
Music: Paradise and Harmony
Musician: @iksonmusic
-
9:30
Sugar Spun Run
4 hours agoBlack and White Cookies
31K1 -
2:45
SLS - Street League Skateboarding
4 days agoManny Santiago's 'THIS IS 40' Part
18.3K1 -
6:40
Homesteading Family
5 days agoNever Make Pie Crust From Scratch Again (Do THIS Instead)
14.2K1 -
44:20
Melissa K Norris
3 days ago $0.20 earnedThe Most Overlooked Way to Preserve Food for Months (No Freezer Needed) w/ Sam Knapp
10K1 -
23:00
Tony Jeffries
6 days agoThe Best & Worst Boxing Training Methods (Ranked by Olympic Boxer)
7.06K -
44:44
Scammer Payback
17 days agoCrazy Confrontation with Hacked Scammer Group
29.5K19 -
1:15:13
Steven Crowder
3 hours agoIt Isn't Both Sides: They Crossed The Rubicon When They Killed Charlie
348K257 -
The Rubin Report
2 hours ago'Real Time' Crowd Goes Quiet as Bill Maher & Ben Shapiro Have a Tense Exchange About Charlie Kirk
12.9K43 -
1:49:25
Benny Johnson
2 hours agoTrump Launches 'Major Investigation' of Leftist Plot in Charlie Kirk Murder, FBI New Evidence…
32K69 -
1:01:26
VINCE
3 hours agoA Turning Point In The Culture | Episode 125 - 09/15/25
223K279