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
kirill115 [55]
3 years ago
14

Write a fragment of code that will read words from the keyboard until the word done is entered. For each word except done, repor

t whether its first character is equal to its last character. For the required loop, use a:_________.
a) while statement.
b) do-while statement.
Computers and Technology
1 answer:
hram777 [196]3 years ago
8 0

Answer:

a)

Scanner keyboard = new Scanner(System.in);

System.out.println("Enter a word");

String word = keyboard.next();

while(!word.equals("done"))

{

if(word.charAt(0) == word.charAt(word.length() - 1))

{

System.out.println("First and last character are equals for the word: " + word);

}

else

{

System.out.println("First and last character are NOT equals for the word: " + word);

}

word = keyboard.next();

}

b)

Scanner keyboard = new Scanner(System.in);

System.out.println("Enter a word");

String word = keyboard.next();

do

{

if(word.charAt(0) == word.charAt(word.length() - 1))

{

System.out.println("First and last character are equals for the word: " + word);

}

else

{

System.out.println("First and last character are NOT equals for the word: " + word);

}

word = keyboard.next();

}while(!word.equals("done"));

Next time note what language you are distributing programming with :)

You might be interested in
In addition to explaining the paper’s topic, a thesis statement provides instructions on how to read the paper. explains why the
tamaranim1 [39]

Answer: I believe it’s explains why the paper was written!

Explanation:

Took edge 2021

8 0
3 years ago
Read 2 more answers
Which of the following statements is true of a server? Question 18 options: A) It supports processing requests from remote compu
TiliK225 [7]

Answer:

Option (A) is the correct answer of this question.

Explanation:

The server supports the processing requests from the remote computers. A system is a device built to accommodate inquiries from many other external systems and customers to execute transactions. Employees are called private computer ,tablets, including phones which connect websites.

Network resources are handled through servers.The server is a software application or tool providing a service to some other software program and its customer, also identified as those of the user.

Other options are incorrect because they are not related to the given scenario.

5 0
3 years ago
Multiple Choice
anygoal [31]

Answer:

cyptographically

Explanation:

Did this question and got it right. Good luck!

6 0
2 years ago
Your colleague received an E-mail from a bank that is requesting credit card and PIN number information. Which of the following
uysha [10]

Answer: A) Phishing

Explanation:

Phishing is type of attack in computer field that is processed to hack or steal the data of authorized user.The attacker acts as trusted party and then interacts with the authorized user through email or messages to gain  confidential information like pin code, credit card number, login details etc of that user.

  • According to the question, colleague is experiencing phishing as he has been requested for pin-code and credit-card number from a wrong source behaving as authorized bank.
  • Other options are incorrect because ransomware is attack that asks for ransom from authorized user for reviving their access. on system. Spoofing is falsifying as some other party to receive advantage.
  • Mail poisoning is inclusion of inappropriate details in email such as invalid email address etc.
  • Thus, the correct option is option(A).
0 0
3 years ago
Select all that apply.
rosijanka [135]

Answer:

don't overuse special effects, match special effects to content, use consistent transitions for each slide

Explanation:

I found this on quizlet.

6 0
2 years ago
Other questions:
  • The type of database that uses fields, records, and measure as data attributes is
    7·1 answer
  • A work-study student receives a paycheck from:
    15·2 answers
  • #Write a function called "replace_all" that accepts three #arguments: # # - target_string, a string in which to search. # - find
    11·1 answer
  • How does technology make America great?​
    10·1 answer
  • Justine was interested in learning how to play the piano. Before she was allowed to even play the piano, she has had to learn
    15·2 answers
  • Write a program that first gets a list of integers from input. The input begins with an integer indicating the number of integer
    12·2 answers
  • Adam's interview with the hiring manager is going well. However, he wants to ensure that his skills and work history are memorab
    6·1 answer
  • One of the benefits of holding an investment for over a year rather than selling it in less than a year is that the
    14·2 answers
  • What approach do you prefer to take when creating presentations for class projects? Would you rather use software or create pres
    12·2 answers
  • What number is represented as a binary code of 101110
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!