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
kobusy [5.1K]
3 years ago
10

I need help with my previous question please

Computers and Technology
1 answer:
fenix001 [56]3 years ago
7 0
I can’t find your previous question :(
You might be interested in
Write an application that inputs a five digit integer (The number must be entered only as ONE input) and separates the number in
netineya [11]

Answer:

The program in Java is as follows:

import java.util.*;

public class Main{

public static void main(String[] args) {

 int n, num;

 Scanner input = new Scanner(System.in);

 System.out.print("Number of inputs: ");

 n = input.nextInt();

 LinkedList<Integer> myList = new LinkedList<Integer>();

 for(int i = 0; i<n;i++){

     System.out.print("Input Integer: ");

     num = input.nextInt();

     while (num > 0) {

     myList.push( num % 10 );

     num/=10;

     }

     while (!myList.isEmpty()) {

         System.out.print(myList.pop()+" ");

     }

     System.out.println();

     myList.clear();

 }

}

}

Explanation:

This declares the number of inputs (n) and each input (num) as integer

 int n, num;

 Scanner input = new Scanner(System.in);

Prompt for number of inputs

 System.out.print("Number of inputs: ");   n = input.nextInt();

The program uses linkedlist to store individual digits. This declares the linkedlist

 LinkedList<Integer> myList = new LinkedList<Integer>();

This iterates through n

 for(int i = 0; i<n;i++){

Prompt for input

     System.out.print("Input Integer: ");

This gets input for each iteration

     num = input.nextInt();

This while loop is repeated until the digits are completely split

     while (num > 0) {

This adds each digit to the linked list

     myList.push( num % 10 );

This gets the other digits

     num/=10;

     }

The inner while loop ends here

This iterates through the linked list

     while (!myList.isEmpty()) {

This pops out every element of thelist

         System.out.print(myList.pop()+" ");

     }

Print a new line

     System.out.println();

This clears the stack

     myList.clear();

 }

8 0
3 years ago
Which type of bank account typically offers no iterest?
SCORPION-xisa [38]
Money market?? i think anyway.
8 0
3 years ago
Read 2 more answers
You can declare new classes as needed; this is one reason java is known as a(n) ________ language.
____ [38]
You can declare new classes as needed : this is one reason java is known as a extensible language.
8 0
3 years ago
Read 2 more answers
Which feature of the Excel window displays the contents of an active cell?
nordsb [41]
I believe the answer is A. Formula Bar if I am not mistaken 
6 0
4 years ago
Read 2 more answers
Andrew frequently uses bullet points and numbered lists in his presentation to _____.
seraphim [82]

Hey there!


Andrew likely does this to convey a <em>point </em>easily. Bullet points offer a way to explain a topic, but in simple sentences that when all add up, explain it. They're meant to be short and sweet, and don't make the reader lose their attention.


Hope this helps!

5 0
4 years ago
Read 2 more answers
Other questions:
  • An expression that has correctly paired delimiters is called a(n)
    6·1 answer
  • which software is used to mimic intricate hand drawings into digital paintings? _____ is used to replicate hand drawings into di
    7·1 answer
  • 1. Please write the following code in Python 3.2. Please also show all outputs.Create a dictionary named letter_counts that cont
    14·1 answer
  • Which is one use for a hyperlink? A. to create a heading style B. to animate important text C. to create a link to a website. D.
    7·1 answer
  • Omar is preparing to deliver a presentation to his class. It is about a program to collect samples from an asteroid that has bee
    13·1 answer
  • The problem analysis phase typically includes which of the following tasks? (Points : 2) Negotiate baseline scope.
    10·1 answer
  • Is a pocket watch consider a computer
    15·1 answer
  • DRU is a small brokerage house that enables its clients to buy and sell
    12·1 answer
  • Why ads on this app do it help pay for the free stuff?
    9·1 answer
  • Imagine that you need to prepare for three end-of-term tests. What steps will you take to make sure your study time is well spen
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!