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
KiRa [710]
3 years ago
11

Write code to print the location of any alphabetic character in the 2-character string passCode. Each alphabetic character detec

ted should print a separate statement followed by a newline.
Ex: If passCode is "9a", output is:

Alphabetic at 1
import java.util.Scanner;

public class FindAlpha {
public static void main (String [] args) {
Scanner scnr = new Scanner(System.in);
String passCode;

passCode = scnr.next();
/*Your solution goes here */
}
}
Computers and Technology
1 answer:
Mars2501 [29]3 years ago
5 0

Answer:

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

           if ((passCode.charAt(i) >= 65 && passCode.charAt(i) <= 90) || (passCode.charAt(i) >= 97 && passCode.charAt(i) <= 122)) {

               System.out.println("Alphabetic at " + i);

           }

}

Explanation:

The rest of the code should be as above.

In order to check if the character is alphabetic or not, we need to use ASCII table. Characters are represented as integers in the ASCII table. For example "a" equals 97, "A" equals 65.

Then all we need to is to check if the character value in ASCII is in alphabetic ranges. If it is, print the index of the character.

You might be interested in
For questions 3-6, consider the following two-dimensional array:
elena-s [515]

Answer:

5= Fabric

6=bandana

Explanation:

8 0
3 years ago
Read 2 more answers
When you make a cell phone call, which type of electromagnetic wave is most likely transmitting the signal?
Olegator [25]
They use Radio waves 
6 0
3 years ago
Leo noticed that attackers have breached his wireless network. They seem to have used a brute-force attack on the WiFi protected
kakasveta [241]

Answer:

It is called a WPS brutal force attack.

Explanation:

Wired and wireless networks are both susceptible to attacks. The wired network, the advantage as a cable connection, is more secure than wireless networks, but wireless network also have security measures like the wifi protected set up (WPS).

WPS is used to connect to a network without passphrase, but with a key combination or a PIN.

Brutal force attacks are used on WPS to forcefully generate the PIN, using a third party software.

3 0
3 years ago
Word processing programs have different view options that you can use depending on the tasks your performing
inysia [295]

Answer:

Microsoft Word has five types of views for a document, and there are a different set of advantages with each of them. There is a full-screen reading option, print layout, web layout, Draft and the Outline, and you can find what purpose they server through their name. And you can change the views of a document in two ways. You can either hit the View tab or you can select a certain view from the View tab. Or you can make use of the view button which is next to the zoom slider, which you can see at the bottom right section of the work space. Let's have a look at each of them now.

Explanation:

Microsoft Word has five types of views for a document, and there are a different set of advantages with each of them. There is a full-screen reading option, print layout, web layout, Draft and the Outline, and you can find what purpose they server through their name. And you can change the views of a document in two ways. You can either hit the View tab or you can select a certain view from the View tab. Or you can make use of the view button which is next to the zoom slider, which you can see at the bottom right section of the work space. Let's have a look at each of them now.

Word Views

The Print Layout View

Its the default one, and you will find this one as you open the document. It's best when you are documenting with things such as images, footers, columns headers, etc. And each of the components is going to be visible. You will hence get a view of documents, and how it looks like as per the page breaks.

The full-screen reading view is for reading purposes. It also shows how a printed page will look like.

Web Layout View

This gives us a view of how the document will look like on the web page. And the text gets wrapped to fit into the view if required.

Outline View

This helps when you want to move the sections in your documents, or if you are creating an outline.

Draft View

This will help you to quickly edit the text with the document being opened as a draft, and the headers and footers cannot be viewed in this view.

5 0
3 years ago
An intruder with malicious intent breaks into an office and steals a hard drive
kakasveta [241]

Answer: data security

Explanation:

The company's authentication protocols and data encryption measures denotes data security.

Data security simply means protecting unauthorized people from having access to a particular data. This is done to prevent unauthorized access of important information or to prevent fraud. Some of the data security measures include data encryption, tokenization, hashing, etc.

4 0
3 years ago
Other questions:
  • Sam wanted to open a file that he saved yesterday. Which component inside the computer stores this file? the hard drive the fax
    13·2 answers
  • Which button could Pamela press in the Microsoft Word spell checker to make the word “colour” instantly change to “color” whenev
    11·1 answer
  • If you want to change the smart quote settings, what steps should you follow to find them?
    5·1 answer
  • Kara has been asked to create an employment application form for her company. Which of the following items can she use to make s
    10·1 answer
  • What is the term for a set of actions carried out on inputs?
    7·1 answer
  • You can align controls in the report design window using the align button on the report design tools ____ tab.
    8·1 answer
  • Which of the following is a good conductor of electricity and heat?
    13·2 answers
  • 4.2 lesson practice help plzs
    6·1 answer
  • You are running your warehouse using Autonomous Data Warehouse (ADW) service and you noticed that a newly configured batch job i
    15·1 answer
  • The email_list function receives a dictionary, which contains domain names as keys, and a list of users as values. Fill in the b
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!