1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Nookie1986 [14]
3 years ago
13

Problem statement: Using loop, write a program that will ask the user to enter a character for left or right. Then, the user wil

l enter a number. The program should generate a ladder of X wherein the level depends on the number entered and the character should dictate whether it faces right or left.
Sample:

Character is r
Number is 3

Output
X
XX
XXX

Character is r
Number is 6
X
XX
XXX
XXXX
XXXXX
XXXXXX

Character is l
Number is 5

X
XX
XXX
XXXX
XXXXX
Computers and Technology
1 answer:
zvonat [6]3 years ago
7 0
Define variables
left is l
right is r

Ask input
left or right

Ask input value

Equate l or r to the input value

Show ladder with steps equal to input value and in the side of input variable
You might be interested in
Please answer quick:))))
Anika [276]
I think B and the second one C
8 0
2 years ago
"Random Bars" is considered to be a Transition style<br> O True<br> O False
Vesnalui [34]
True….hope it helps love
8 0
2 years ago
PLEASE HELP!! Computer science test
tatiyna

Answer:

See Explanation

Explanation:

Given

The attached function

What the recursion does is that; it adds up individual digits from N to 0

Solving (a): Each output when N = 6

For N = 6.

The function returns the following values:

f(6) = 6

Then: 6 + f(5)

Then: 6 + 5 + f(4)

Then: 6 + 5 + 4 + f(3)

Then: 6 + 5 + 4 + 3 + f(2)

Then: 6 + 5 + 4 + 3 + 2 + f(1)

Then: 6 + 5 + 4 + 3 + 2 + 1 + f(0)

Then: 6 + 5 + 4 + 3 + 2 + 1 + 0 = 21

Solving (b): The output when N = 7

Using the same process in (a) above.

The output is 28

6 0
3 years ago
What happens when you press the Enter key at the end of a line of bulleted text?
sladkih [1.3K]

i think the  answer is d

6 0
3 years ago
Read 2 more answers
Which leader of the Jamestown colony am I?
faltersainse [42]
I am not completely sure, but I believe that the leader of the Jamestown colony described in this paragraph is John Rolfe.
7 0
3 years ago
Read 2 more answers
Other questions:
  • Write a program to add two number marie simulator.
    15·1 answer
  • \Read the sentence.
    12·1 answer
  • In which situations would it be most helpful to filter a form? Check all that apply.
    8·1 answer
  • Write an assembly subroutine that check if a number is in the interval of [0, 10] and return 1 if the number is in this interval
    6·1 answer
  • Where does the turtle belong in the cladogram shown below?<br> I’LL GIVE YOU BRAINLYEST
    6·2 answers
  • How do you remove management from your chrome book [administrator]
    12·1 answer
  • What common variation of the Server Message Block (SMB) sharing protocol is considered to be a dialect of SMB?
    11·1 answer
  • In English there are five vowel letters in the alphabet: A, E, I, O, U. For the purposes of this exercise we won't count Y as a
    5·1 answer
  • Whats the flow in this code, and whats the risk that its creating and what can i do to fix it? (c language)
    10·1 answer
  • The…..executed simple
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!