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
The three basic processes of memory are ______.
marysya [2.9K]

Answer:

The correct answer is letter "C": encoding, storage, retrieval.

Explanation:

In psychology, the stages of memory are <em>encoding, storage, </em>and <em>retrieval</em>. Encoding refers to changing the information as it is received so it can be stored in the memory and imply inputs in three kinds: <em>visual (pictures), acoustic (sounds), </em>and<em> semantic (meaning)</em>. Storage is the stage in which the input is retained in the memory, where it is stored, and for how long. Finally, retrieval implies organizing information stored in the memory to recall it.

6 0
2 years ago
The following outline is used to plan a program. What is the name for this type of plan?
vladimir1956 [14]
Pseudocode is the answer
7 0
3 years ago
Read 2 more answers
4. What is a pentaprism? What job does it do in the camera?
Nadya [2.5K]
Pentaprism is a five sided prism with two silvered surfaces giving a non-stop deviation of all rays of light through 90 degress. Used in viewfinders of single-lens reflex cameras 
6 0
2 years ago
Read 2 more answers
10
Dmitrij [34]

Answer:

i need more \\

Explanation:

Chemical cold packs should be used for bone and joint injuries because they are generally colder than ice and stay cold longer.

A.  

True

B.  

False

Reset

4 0
2 years ago
Select the correct answer.
lisov135 [29]

Answer:

D. Prepare the content

Explanation:

Before Jennifer starts designing the website she has to prepare content for the website

5 0
2 years ago
Read 2 more answers
Other questions:
  • Heatsinks used to protect cpus in computers from overheating, are shaped so that their surface area is very large. why is that?
    5·1 answer
  • Your desktop computer monitor is not displaying a picture. What would you do to troubleshoot the problem?
    7·2 answers
  • What part of a file name does windows use to know which application to open to manage the file?
    13·2 answers
  • Write a Python program to do the following: (a)Use a for loop and a random integer generator to generate 5 random integers in 1
    10·1 answer
  • While doing research on the Internet, what kind of website should you avoid because the information may be biased?
    11·1 answer
  • E. what component must be compatible with every other component of the computer?
    15·1 answer
  • For the Address Block 195.200.0.0/16 a. If you have 320 Customers that need 128 addresses/customer - will there be enough addres
    14·1 answer
  • For a typical middle-income family, what is the estimated cost of raising a child to the age of 18?
    11·1 answer
  • Fill in the blanks to make the factorial function return the factorial of n. Then, print the first 10 factorials (from 0 to 9) w
    6·1 answer
  • If tech is smarter than us. How did a human make something smarter than him/her?
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!