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
sergeinik [125]
3 years ago
3

In Java please.

Computers and Technology
1 answer:
inn [45]3 years ago
5 0

Answer:

import java.util.Scanner;

public class BasicInput {

   public static void main(String[] args) {

       Scanner scnr = new Scanner(System.in);

       int userInt = 0;

       double userDouble = 0.0;

       String randomcharacter;

       String enterstring ;

       char randomc;

       System.out.println("Enter integer: ");

       userInt = scnr.nextInt();

       System.out.println("Enter double: ");

       userDouble = scnr.nextDouble();

       System.out.println("Enter character: ");

       randomcharacter = scnr.nextLine();

       randomc = scnr.nextLine().charAt(0);

       System.out.println("Enter string: ");

       enterstring = scnr.next();

       System.out.println(userInt + " " + userDouble + " " + randomc + " " + enterstring);

       System.out.println(enterstring + " " + randomc + " " + userDouble + " " + userInt);

       System.out.println(userDouble+" cast to an it is "+(int)userDouble);

   }

}

Explanation:

  • Two changes was made to the code to give the required output see them boldened
  • Firstly the declarion is chabged from Character to char
  • Then an output line is added to print teh value of the userDouble casted to an int
You might be interested in
Must be at least 6 characters and contain at least one letter, one number and one special character. whats a good password? ive
Kamila [148]
Things about you or your favourite specialities
3 0
3 years ago
time to throw poggers xqc time to throw pogchamp time to throw pogchamp time to throw pogchamp time to throw pogchamp time to th
Effectus [21]
Yes thank you very much
6 0
3 years ago
Read 2 more answers
Which protocol that runs on cisco routers shares information between cisco devices?
just olya [345]
The CDP protocol runs on CISCO routers and shares information between CISCO devices. CDP stands for Cisco Discovery Protocol. It is a protocol on Layer 2 (Data -Link layer) of the OSI model that enables CISCO devices to share information between them. The information includes for example the <span>operating system version and IP address.</span>
6 0
3 years ago
Harlequin frogs are an endangered species that live in a small area of Costa Rica. The reasons for the species' decline is unkno
Damm [24]

Answer:

<u>a. The scientists must be careful of how many variables they include in their simulation so they do not cause further harm to the frogs.</u>

Explanation:

It is not statistically accurate to assume that the number of variables included in the simulation would cause further harm to the frogs because we need to <em>remember </em>that a simulation is simply a computerized imitation of a real situation, which is usually not totally alike with a real process.

So in no way from a statistical standpoint, does the scientists' decision on the number of variables causes direct harm to the frogs.

3 0
3 years ago
Chip is examining data regarding the age at which people got married. He notices that in a number of cases people were reported
erastova [34]

Answer:

Data Cleaning

Explanation:

According to my research on data management, I can say that based on the information provided within the question what Chip is doing is an example of Data Cleaning. This term refers to the process of finding errors within sets of data and correcting or removing them from the set, or even the database entirely, this includes any data that may be inaccurate to completely wrong.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

6 0
4 years ago
Other questions:
  • Power point 2016 which chart element provides the boundaries of the graphic?
    6·1 answer
  • 3. The combination of keys that we should press to select all document is
    14·1 answer
  • What's a good drawing tablet?
    12·2 answers
  • Katarina is deciding whether to buy a desktop or a laptop computer. What will most likely help Katarina make her decision?
    10·2 answers
  • What's ur favorite color and your dream car
    8·2 answers
  • What is the most common etical rule that must be applied in all technologies​
    5·1 answer
  • Another word for Arithmetic Logic Unit​
    6·1 answer
  • How do cybercriminals use JavaScript maliciously?
    11·1 answer
  • Wap to calculate the simple interest for the given PTR​
    14·1 answer
  • When creating a report,you can mske groups and subgroups by?​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!