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
fgiga [73]
4 years ago
12

Write a program that accepts a four digit number, such as 1998, and displays it on number on a line, like: 1 9 9 8 The program s

hould prompt for a four digit number. The program assumes that the user enters the correct information. Provide the java code, including a comment with your name, course code and date.

Computers and Technology
1 answer:
jonny [76]4 years ago
4 0

package brainly;

import java.util.*;

/**

*

* @author CotrinaAlejandra

*/

public class Brainly {

   /*Provide the java code, including a comment with your name, course code and date.

   Name:  

   Course:  

   Date: */

   public static void main(String[] args) {

       // TODO code application logic here

       int number;

       Scanner sc = new Scanner(System.in);

       System.out.print("Write a four digit number: ");

       number=sc.nextInt();

       String newLine= String.valueOf(number);

       System.out.println(newLine.charAt(0)+"  "+newLine.charAt(1)+"  "+newLine.charAt(2)+"  "+newLine.charAt(3));

       

       

   }

   

}

You might be interested in
A web crawler uses a search _______ to traverse the web.​
aliina [53]
<span>A web crawler uses a search algorithm to traverse the web.
</span>The web crawler is responsible for the process of browsing the net. It systematically browses the World Wide Web<span> by looking at the keywords in the pages, the kind of content each page has and the links, and then return this information to the search engine.</span>
The process is called Web crawling or spidering.
7 0
4 years ago
Under which menu option of a word processing program does a callout appear?
Juli2301 [7.4K]
A callout is a type of text box that also includes a line for pointing to any location on the document. A callout appears under the SHAPES <span>menu of the word processing program. The answer that completes this statement is the word "shapes". Hope this answers your question. </span>
7 0
3 years ago
What does it mean to have 2 warnings on brainly and what if i get another one?
steposvetlana [31]
By giving wrong answers or cheating I guess
5 0
3 years ago
Read 2 more answers
Which of the following characters is acceptable to use in a filename
Rama09 [41]
You never stated the possible answer choices to your answer, but usually in a filename you can use all letters of the alphabet, but you cannot use any symbols. such as backslashes, percentage signs etc., but underscores you can use, since they can be used for spacing 2 seperate words.
4 0
3 years ago
Read 2 more answers
Write a python program to accept a number and check whether it is divisible by 4 or not​
Alenkasestr [34]

Answer:

number = int(input("Enter number: "))

if (number % 4):

 print("{} is not divisible by 4".format(number))

else:

 print("{} is divisible by 4".format(number))

Explanation:

If the %4 operation returns a non-zero number, there is a remainder and thus the number is not divisable by 4.

5 0
3 years ago
Other questions:
  • 1. Describe a system that would be dangerous if resistance were not a part of the circuit
    12·2 answers
  • The smallest unit of storage in the following list is a
    7·1 answer
  • How to see if your computer has bluetooth?
    6·1 answer
  • You notice that it’s very easy to confuse medications at the community health center where you’re working. They are lined up on
    10·1 answer
  • Why is statistics important for business professionals in many career fields?
    13·2 answers
  • The Python print function
    9·1 answer
  • Brainliest to Best Answer!
    6·1 answer
  • Describing Report Viewing
    5·1 answer
  • A large computer software firm promised a client that it could deliver a new operating system on a tight deadline and put Keith
    10·2 answers
  • Which type of SQL Injection allows an attacker to try to alter the SQL statement such that it always returns TRUE (authenticatio
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!