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
kari74 [83]
3 years ago
5

Which line of code will find the first occurrence of a three in an array?

Computers and Technology
2 answers:
eduard3 years ago
5 0
Arr.index[3] is most likely true
motikmotik3 years ago
3 0

Answer:

It is arr.index(3)

Explanation:

You might be interested in
Do all light bulbs server a practical purpose?
Greeley [361]

Answer:

A light bulb produces light from electricity

6 0
3 years ago
WILL GIVE BRAINLIEST!!!!!!!
stellarik [79]
True











Dhahvdbdbrhhehebdbdbbdbd sorry it has to be longer ahhshdjdjhsjdjdbdnbfbfjfj
7 0
2 years ago
Read 2 more answers
Which one of them are the correct answers?
Tpy6a [65]

Rapid prototyping! I am sure that is correct


6 0
3 years ago
Write a program that takes in a line of text as input, and outputs that line of text in reverse. The program repeats, ending whe
OLEGan [10]

Answer:

The solution code is as below:

  1.        Scanner input = new Scanner(System.in);
  2.        System.out.print("Input a string: ");
  3.        String inStr = input.nextLine();
  4.        int strLen = inStr.length();
  5.        while(inStr.equals("Quit") != true && inStr.equals("quit") !=true && inStr.equals("q") != true){
  6.            for(int i= 0; i < strLen; i++){
  7.                System.out.print(inStr.charAt(strLen - 1 - i));
  8.            }
  9.            System.out.println();
  10.            System.out.print("Input a string: ");
  11.            inStr = input.nextLine();
  12.            strLen = inStr.length();

Explanation:

Firstly, we create a Scanner object,<em> input</em> (Line 1).

Next, we use the Scanner object nextLine() method to get a text input from user (Line 3).

We create a while loop and set the condition so long as the input text is not equal to "Quit", "quit" or "q" (Line 6), the program should proceed to print the input text in reverse (Line 8-10). To print the text in reverse, we can apply the expression<em> length of string - 1 - current index</em>.  This will ensure the individual letter is read from the last and print the text in reverse.

Next, prompt the user to input a new text (Line 13-14) and repeat the same process of printing text in reverse so long as the current input text is not "Quit", "quit" or "q".

6 0
3 years ago
Plz help me in this example
Gekata [30.6K]

Answer:

import java.util.*;

public class calcarms

{

public static void main(String [] args)

{

 Scanner input = new Scanner(System.in);

 //Declare Variable

 int num;

 //Initialize num to 0

 num = 0;

 //Print heading

 System.out.println("Armstrong Numbers\t\tDifference between Successive Armstrong Numbers");

 //Call Armstrong method

 boolean result = Armstrong(num);  

}

public static boolean Armstrong(int num)

{

 int nums;

 //Initialize old_Arms and new_Arms to 0

 int old_Arms =0; int new_Arms = 0;

 for(int i = 0;i<=500;i++) //Iterate from 0 to 500

 {

  nums = i;

 int temp,calc = 0;

 temp = nums;  

  //Check individual digit of each number

 while(nums > 0)

 {

  int a=nums%10;  

  nums/=10;

  calc+=(a*a*a);//Find cube of number

 }

 if(temp == calc) //Check if number is armstrong

 {

  new_Arms = calc;

  old_Arms = new_Arms - old_Arms;

  System.out.println(calc+"\t\t\t"+old_Arms);//Print

  old_Arms = calc;      

 }

 }

 return true;  

};

}

Explanation:

Comments are used to explain difficult lines

4 0
3 years ago
Other questions:
  • Into which of these files would you paste copied information to create an integrated document? A. Mailing list B. Source C. Data
    13·2 answers
  • Suppose that a local area network requires seven letters for user names.​ lower- and uppercase letters are considered the same.
    13·1 answer
  • Information systems security is the collection of activities that protect the information system and the data stored in it.
    12·1 answer
  • Tab stops are very useful when you want to A. align text into rows. B. add space between paragraphs. C. align text into columns.
    14·2 answers
  • If you filmed a clip in 120fps, how many frames are in a seconds of video.
    13·1 answer
  • According to company policy and administrator must logically keep the Human Resources department separated from the Accounting d
    5·1 answer
  • #Write a function called alter_list. alter_list should have#two parameters: a list of strings and a list of integers.##The list
    11·1 answer
  • What are three sections in a work sheet accounting
    12·1 answer
  • Why is it important to have a price assiociated in every product​
    10·2 answers
  • The pci express version 4.0 can provide up to what amount of throughput with 16 lanes for data?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!