Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help with one part of my code. The user input phrase that's less than 31 returns fine (It seems). I am having trouble

I need help with one part of my code. The user input phrase that's less than 31 returns fine (It seems). I am having trouble with the second part where the phrase imputed by the user is greater than 31. I know it has something to do with substring but I am having a hard time figuring out this simple mistake.

NOTES: Max # of characters per line of text (without the border) is thirty.

I need it to look like this:

image text in transcribed

This is what I get when I run my code (something is wrong):

image text in transcribed

Here is my code so far (I already put the user input code to scan for phrase and character):

image text in transcribed

Thank you in advance!

Enter a phrase: a bcdefghijklmnopqrstuvwxyz Enter a character: abcdefghijklm GAME OVER MAN ! Enter a phrase: abcdefghijkzmnopqrstuvwyz Enter a character: 1 a b c d f ghijk lmm pqqstuvwyz GAME OVER MAN

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Learning MySQL Get A Handle On Your Data

Authors: Seyed M M Tahaghoghi

1st Edition

0596529465, 9780596529468

More Books

Students also viewed these Databases questions

Question

afuatad pandind aquap be budget wha steb

Answered: 1 week ago

Question

State the uses of job description.

Answered: 1 week ago

Question

Explain in detail the different methods of performance appraisal .

Answered: 1 week ago

Question

LO4 Identify a system for controlling absenteeism.

Answered: 1 week ago

Question

LO2 Explain the nature of the psychological contract.

Answered: 1 week ago