Computers and Technology
Computers and Technology, 30.11.2021 01:00, ladybugys

WILL GIVE BRAINLIEST Output:

US state: Texas

Capital: Austin

The capital of Texas is Austin

Description:

Copy and paste the code below:

/

* Name:

* Assignment: A01

/

public class A01{

public static void main(String[] args){

// part1

System. out. print("x x x");

System. out. print("x o x");

System. out. print("x x x");

System. out. println();

// part2

}

}

Write your name in the comment on top. The red letters in the output are the user inputs.

This assignment consists of 2 parts.

First you demonstrate your understanding of the different print statements by modifying a

code segment. Then you read in two Strings and print a statement based on the user input.

Part1:

The code segment provided includes

three print statements that produce

the following output:

Change the code segment so that it

produces the following output:

Hint: you will need to change the number of

statements

Part2:

• Prompt the user to enter a state

• Read in the user response and assign

it to a String variable named state

Hint: before you can assign a value to the

variable state it needs to be declared

• Prompt the user to enter the name of

the capital

• Read in the user response and assign

it to a String variable named capital.

• Use printf and format specifiers to

print the following message:

The capital of state is capital

where you substitute state and capital with

the state and capital entered by the user.

Make your output look exactly like the output displayed above.

Make sure to read in the input next to the prompt but without touching it (use a blank to

separate the prompt from the user input). The output should use a single empty line to

separate the frog displayed in part1 from the output created in part2.

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 01:30, Daud2020
What kind of motivation is katrina showing? use the drop-down menu to complete the statement. katrina is using motivation because she is personally interested in learning more.
Answers: 2
image
Computers and Technology, 22.06.2019 06:00, wbrandi118
What role do chromosomes play in inheritance?
Answers: 1
image
Computers and Technology, 22.06.2019 10:30, ghazanfarwaheed7967
Auniversity wants to install a client-server network. which feature do you think is important for them as they set up the network? sending email blocking multiple people to use the same file low security low set up cost limited access to files
Answers: 1
image
Computers and Technology, 22.06.2019 19:30, Jbutler15
When creating a presentation in libre office impress, where does the editing of slides take place?
Answers: 1
Do you know the correct answer?
WILL GIVE BRAINLIEST Output:

US state: Texas

Capital: Austin

The...

Questions in other subjects: