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]
2 years ago
7

JAVA

Computers and Technology
1 answer:
butalik [34]2 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
What does FIFO mean?
zubka84 [21]
Hello there!

It is First In First Out

Hope This Helps You!
Good Luck :)
6 0
3 years ago
Read 2 more answers
How do you get a free ps4
KatRina [158]

Answer:

By having very good luck and winning it in a giveaway!!!

4 0
3 years ago
Read 2 more answers
When would an absolute cell reference be most helpful?
Aliun [14]

Answer:

The answer is : When there is a need to copy a formula and have the references update based on the new location

Explanation:

<em>I often use this function in any spreadsheet document. Imagine, you have thousands of data in a single sheet. And you inserted one row or column. Normally, you have to update EACH CELL's formula. Imagine the work load and the effort you need to exert. But when the single cell updates all the cell's reference, formula will be affected and you don't need to re update all the cells. It saves you time and effort and worries.</em>

3 0
3 years ago
Read 2 more answers
What is the operation of an earth leakage tester
Vladimir [108]

In any electrical installation, some current will flow through the protective ground conductor to ground. This is usually called leakage current. Leakage current most commonly flows in the insulation surrounding conductors and in the filters protecting electronic equipment around the home or office. So what's the problem? On circuits protected by GFCIs (Ground Fault Current Interrupters), leakage current can cause unnecessary and intermittent tripping. In extreme cases, it can cause a rise in voltage on accessible conductive parts. 


5 0
3 years ago
Call your function from Example 1 three times with different kinds of arguments: a value, a variable, and an expression. Identif
Blizzard [7]

Answer:

Example 1:

def function(num):  

   print(num*2)

Example 2:

function(5)

num = 2

function(num)

function(3-1)

Explanation:

Given:

See attachment for complete question

To start with Example (1)

def function(num):  

   print(num*2)

<em>Note that; the above code segment which doubles the parameter, num could have been any other code</em>

<em />

<em>In Example (1), the parameter is num</em>

For example (2):

We can call the function using:

#1. A value:

function(5)

<em>In #1, the argument is 5; a value</em>

#2. A Variable

num = 2

function(num)

<em>In #2, the argument is num; a variable</em>

#3. An Expression

function(3-1)

<em>In #3, the argument is 3-1; an expression</em>

8 0
3 years ago
Other questions:
  • Tell me the shortcut keys used in Ms PowerPoint ?​
    6·2 answers
  • Power brakes:
    12·2 answers
  • What unit is used for measure disk size ?
    10·1 answer
  • While reviewing some web page code, you notice that the html is written in all lowercase letters. you are not sure which version
    14·1 answer
  • Create a Produceclass that hasan instance variable of type Stringfor the name, appropriate constructors, appropriate accessor an
    13·1 answer
  • Which of these is NOT a standard part of the outro of a podcast?
    15·1 answer
  • Describe how a computer checks whether the image just taken by the camera matches the scanned photograph.
    12·1 answer
  • Hilarious error messages
    10·2 answers
  • Please choose odd one out please tell fast​
    12·1 answer
  • 2. The On and Off states are represented by _____________ class 7 number system​
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!