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
scoundrel [369]
3 years ago
5

Assume that name and age have been declared suitably for storing names (like "Abdullah", "Alexandra" and "Zoe") and ages respect

ively. Write some code that reads in a name and an age and then prints the message "The age of NAME is AGE." where NAME and AGE are replaced by the values read in for the variables name and age. For example, if your code read in "Rohit" and 70 then it would print out "The age of Rohit is 70.".
Computers and Technology
1 answer:
Irina18 [472]3 years ago
3 0

Answer:

import java.util.Scanner;

public class num2 {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Enter Name");

       String name = in.next();

       System.out.println("Enter Age");

       int age = in.nextInt();

       System.out.println("The age of "+name +" is "+age);

   }

}

Explanation:

Java programming language is used to write the code.

The scanner class is used to prompt and receive values for name and age which are stored in the appropriate variables.

The key idea here is using string concatenation in the output statement in order to print the desired output

You might be interested in
A program that will read each player’s name and golf score as keyboard input,
PtichkaEL [24]
Use for loop and question inside it
7 0
3 years ago
Need help developing code!!
Alexxandr [17]
If you are just starting go on khan academy and go to the computing section and they will start you out on the basics on code devoloping. 
4 0
3 years ago
Any one know how to fix forzas camera bc it shutters to much
igomit [66]

Answer:

LEDs are powered by alternating current AC.

Explanation:

The electricity will move in and out of cycles.

When the FPS won't math it'll flicker. Try switching to your camera's shutter speed instead. ( May be times your camera won't support it.)

6 0
3 years ago
This is a while loop question for Information technology.
aev [14]

Answer: use GitHub

Or stack overflow

Explanation:

6 0
3 years ago
Which HTML tag is formatted correctly?
WITCHER [35]
A: This is a heading
3 0
3 years ago
Other questions:
  • Which encryption standard goes with the WPA2 protocol?<br> AES<br> DES<br> TKIP<br> WPS
    10·1 answer
  • Suppose that Alice wants to send Bob a 50 kilobyte message over a 1 Gbps link. The total time required to transmit the message (
    5·1 answer
  • Which fact does lean green eco machines present to show that electric cars are not perfect
    13·2 answers
  • Which of the following is NOT a strength of monetary policy?
    15·1 answer
  • Which statement is NOT CORRECT?
    11·1 answer
  • From the Software Engineering Code of Ethics, which clauses relate to intellectual property (check all that apply)
    15·1 answer
  • 2.36 LAB: Warm up: Variables, input, and casting (1) Prompt the user to input an integer, a double, a character, and a string, s
    12·1 answer
  • How do you access the <br><br>internet in your school and at home?​
    11·1 answer
  • 1. What year was the Entertainment Software Rating Board created?
    15·1 answer
  • Write if true or false
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!