answer.
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]
2 years ago
3

In Java please.

Computers and Technology
1 answer:
inn [45]2 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
B2B partners often connect to each other on the Internet through special __________ designed to facilitate information exchanges
Alenkasestr [34]

Answer:

web portals

Explanation:

B2B (business-to-business) is a marketing strategy that deals with meeting the needs of other businesses, by selling products or services to the organizations for resale to other consumers, used in production of goods or for the operation of an organisation.

B2B (business-to-business) model focuses on facilitating sales transactions between businesses.

Under the B2B, the producer sells its products directly to other businesses such as wholesalers or retailers and not the end consumers.

B2B partners often connect to each other on the Internet through special web portals that are designed to facilitate exchange of information and simplified business transactions.

Additionally, a popular application of the seller-side marketplace model, which is a major business-to-business (B2B) e-commerce model, is e-procurement of goods through the use of web portals over the internet and as such eliminating the option of physical buying or procurement.

3 0
1 year ago
Each level of a smartphone app adds more gems for you to match. On level one, there were 13 gems. On level twelve, there were 12
Sidana [21]
<span>Level : 1,2,3,4,5,6,7,8,9,10,11,12
Gems : 13 to 123
We have to increase from 13 to 123 over a span of 11 levels.
That's an increase of 110 over 11 levels.
110 / 11 = 10
So we go up 10 gems each level Level : 1,2,3,4,5,6,7,8,9,10,11,12
Gems : 13 23 33 43 53 63 73 83 93 103 113 123</span>
5 0
2 years ago
The Spinning Jenny reduced the number of workers necessary to _______. a.remove cotton seeds from fibers b.pump water from the m
bazaltina [42]

The answer is D: Turn yarn into cloth.

During the industrial revolution, a number of new inventions in the textile industry greatly impacted this industry. However, it was the invention of the Spinning Jenny that is credited a lot. It helped move the textile industry from homes to factories and made wool spinning easier and faster. This invention, however, impacted the labor workforce. It reduced the amount of work needed to produce yarn. One worker was able to work 8 or more spools at once and rose to 120 due to technological advancements.

5 0
2 years ago
Which of the following statements does not contain an error?
Drupady [299]
III is correct .... esc code use \
3 0
2 years ago
What output is produced by the following program segment? Why? (Recall that name.charAt(i) is the i-th character in the string,
vekshin1

Answer:

The output is:

R

M

N

Explanation:

The code snippet print the beginning letter of each word in the given name.

In the for loop snippet:

first the program check if startWord is true and it is true, then it print the value of the character at index 0. Then it check if value of character is empty. If it is empty, startWord is initialized to true else it is initialized to false.

The loop only print a character when the value of i are 0, 8 and 11 which are also the beginning character of a word.

8 0
2 years ago
Other questions:
  • Icon view, list view, and details view are all common views provided by which kind of program?
    6·2 answers
  • Explain briefly why the crowd sourcing technique could help a single individual with a difficult personal decision.
    14·1 answer
  • Which use case can be accomplished using a custom link? Choose 3 ans A. Navigate to a process to update the current record. B. N
    10·1 answer
  • You're the sole IT employee at your company. Most of the computers in your fleet are Windows machines. Your boss wants you to se
    11·1 answer
  • 3. Choosing a pre-formatted presentation (that already has a design in the slides) is called choosing a ?
    6·1 answer
  • This program will store roster and rating information for a soccer team. Coaches rate players during tryouts to ensure a balance
    5·1 answer
  • Using virtualization comes with many advantages, one of them being performance. Which of these is NOT another realistic advantag
    7·1 answer
  • Write an application that accepts up to 20 Strings, or fewer if the user enters the terminating value ZZZ. Store each String in
    15·1 answer
  • Accenture has partnered with a global construction company that specializes in building skyscrapers. The company wants better ma
    12·1 answer
  • The microprogram counter (MPC) contains the address of the next microcode statement for the Mic1 emulator to execute. The MPC va
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!