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
igomit [66]
3 years ago
7

JAVA

Computers and Technology
1 answer:
butalik [34]3 years ago
5 0

Answer:

import java.util.*;

public class MyClass {

   public static void main(String args[]) {

       Scanner input = new Scanner(System.in);

       System.out.print("Input a word: ");

       String userinput = input.nextLine();

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

           System.out.print(userinput.charAt(i));

       }

   }

}

Explanation:

This line prompts user for input

       System.out.print("Input a word: ");

This declares a string variable named userinput and also gets input from the user

       String userinput = input.nextLine();

The following iterates through every other character of userinput from the first using iteration variable i and i is incremented by 2

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

This prints characters at i-th position

           System.out.print(userinput.charAt(i));

You might be interested in
The class attribute
Elodia [21]

the answer is d plz let me know if i got it right

6 0
3 years ago
A computer with 5 stage pipeline like the one descrive in class delas with conditional branches by stalling for the next three c
trasher [3.6K]

Answer:

It hurts 80%

Explanation:

7 0
3 years ago
When a computer uses hard disk space as an extension of ram, this is known as what?
labwork [276]
Swapping. Swapping is done by memory pages (4kb or 4096 bytes). DOS calls it paging.
5 0
3 years ago
When santo is formatting the text in his wordart text box, he discovers that by default the text box is formatted with _______ t
Rina8888 [55]
<span>When Santo is formatting the text in his Wordart text box, he discovers that by default the text box is formatted with In Line With Text text wrapping. In order to change the text wrapping you should click the File Tab, then Word Options and then Advanced.

</span>
4 0
3 years ago
A string of zero length is an
Oxana [17]
Null string.




__________________________________
5 0
3 years ago
Other questions:
  • Select all actions that a database may perform
    8·1 answer
  • Which of the following statements is true regarding input and output?
    14·1 answer
  • Which key toggles between insert mode and overtype mode?
    12·1 answer
  • Which business case is better solved by Artificial intelligence than conventional programming?<br>​
    8·1 answer
  • Satırlar ve sütunların kesişmesiyle oluşan kutular aşağıdakilerden hangisidir
    15·1 answer
  • An electronic element that stores data by changing its resistance based on the current that has passed through it (similar to RR
    5·1 answer
  • Which password attack method uses long lists of words that have been predefined and can be quickly downloaded for use to break a
    14·1 answer
  • How do you mark someone brainliest?
    11·2 answers
  • What is the purpose of heading tags?
    15·1 answer
  • The coordinates for the section element need not be defined as long as its position is set to
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!