answer.
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
Ainat [17]
1 year ago
6

Write code which takes a sentence as an input from the user and then prints the length of the first word in that sentence.

Computers and Technology
1 answer:
Afina-wow [57]1 year ago
7 0

import java.util.Scanner;

public class U2_L3_Activity_Four {

   public static void main(String[] args) {

       Scanner scan = new Scanner(System.in);

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

       String sent = scan.nextLine();

       int count = 0;

       for (int i = 0; i < sent.length(); i++){

           char c = sent.charAt(i);

           if (c != ' '){

               count++;

       }

           else{

               break;

           }

       

   }

       System.out.println("The first word is " + count +" letters long");

   

   }

}

We check to see when the first space occurs in our string and we add one to our count variable for every letter before that. I hope this helps!

You might be interested in
1. Jesse wants a recommendation about creating an SCR help desk. She said that I can find lots of information about help desks o
OLEGan [10]

Answer:

The recommendations for Jesse about creating an SCR help desk are, the user interface, sending of data request to servers, sending data files back to the server, receiving  data files from the server, running an application programs locally to process data.

File server handles several jobs which includes, sending data files to client, storing of data files, and generating traffic on the internet.

The client/server tiers  allows user interface on the client and data can be stored on the server. it's elements includes the following: output, input, processes, performance, control and security

Explanation:

Given that:

(1)The recommendations is stated as follows:

A file sharing architecture is recommended where the clients can handle the following:

  • The user interface
  • Sends data request to servers
  • Sends data files back to the server
  • Receives data files from the server
  • Runs application programs locally to process data

The file server handles the following tasks or jobs which is stated below:

  • Receives data request from clients
  • Sends data files to client
  • Stores data files
  • Manage multi-user access
  • Generate LAN traffic

The Client design:

  • Lower  network traffic
  • Faster performance
  • Lower initial cost
  • Lower maintenance cost

The disadvantage of this, is that it is more difficult to design

Note: Kindly find an attached copy of part of the solution to this given question below

4 0
2 years ago
You make a phone call to your local electricity company with a question about
lisabon 2012 [21]

Answer:

A. Keeping valuable staff.

Explanation:

When I make the call to the local electricity company asking about my most recent bill.My call was passed to department to department before getting a representative who can address my queries.The CRM component that needs to be addressed so that the contact is less-time consuming is keeping he valuable staff.

4 0
2 years ago
Bluetooth is a common wireless protocol used to make pan connections. <br> a. True <br> b. False
Minchanka [31]
 a. True  This  is because it covers only a short distance  and allows  sharing of data between short distances(PAN) 
5 0
2 years ago
Life changing technology is easy to fall in love with. Describe a feature of a product that did it for you and highlight its ben
professor190 [17]

One example of life changing technology that had a huge impact on my life was Artificial Intelligence.

Whether it is Google Assistant or Amazon Alexa or some online AI trained doctor, its one thing you can rely on and have great benefits from.

Such as keeping up with every day reminders in your busy life or telling a medicine for your sick child or brother online without going to the hospital or sometimes gives us suggestions.

It changed our lives in some manner, at least mine.

5 0
2 years ago
Every noticeable event, transaction, interaction, request and reply, and so on are being expectantly captured and saved in stora
Debora [2.8K]

Answer:

Every noticeable event, transaction, interaction, request and reply, and so on are being expectantly captured and saved in storage appliances and arrays for real-time as well as posterior investigations create something we call it <u>Big Data.</u>

<u></u>

Another way to look at is that it comprises massive amounts of data that keeps on growing exponentially over time so much so that it cannot be processed or analyzed using usual data processing techniques.

Cheers!

7 0
1 year ago
Other questions:
  • Remember that ""state space"" refers to the space of all potential possibilities. Which dichotomous questions below will success
    5·1 answer
  • Dr. Robbins wants to know if there are different opinions regarding the value of public school education between Native American
    11·1 answer
  • Mobile computing has two major characteristics that differentiate it from other forms of computing. What are these two character
    8·1 answer
  • Write the definition of a function printAttitude, which has an int parameter and returns nothing. The function prints a message
    14·1 answer
  • How is the IT function organized in your school or place of employment? Create an organization chart showing how the IT organiza
    7·1 answer
  • You have been employed as a technical consultant to a computer shop chain. You are given the task of creating a short consumer b
    12·1 answer
  • Organizations that have no physical ("brick and mortar") presence, but only exist because of communication and computer technolo
    9·1 answer
  • A computer application such as Microsoft Access that is used to store data and convert it into information is a ________________
    6·1 answer
  • Explain working principle of computer?​
    13·1 answer
  • Write a program to input value of three sides, to check triangle is triangle is possible to form of not​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!