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
ladessa [460]
3 years ago
15

Instructions Write a program that asks the user for a number. If the number is between 1 and 255, the program outputs the corres

ponding ASCII character. If it is outside of that range, the program outputs Out of range.
Computers and Technology
1 answer:
Alenkasestr [34]3 years ago
8 0

Answer:

import java.util.Scanner;

public class num5 {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Enter a number between 1 -255");

       int num = in.nextInt();

       if(num >= 1 && num<=255){

           char c = (char)num;

           System.out.println("The ASCII Value of "+num+" is "+c);

       }

       else{

           System.out.println("Out of range");

       }

   }

}

Explanation:

  • Use the scanner class to receive a number from the user save in a variable num
  • Use if statement to ensure the number is within the valid range num >= 1 && num<=255
  • Convert the number to the ASCII equivalent by casting it to char data type
  • Output the number and the ASCII equivalent
  • if num was out of range, print Out of range

You might be interested in
Robert's computer is not starting due to an error in the BIOS. Which of these chips could have malfunctioned? Select the correct
timofeeve [1]

Hi;

In the question, Robert gives the explanation that there is an error in the BIOS. A BIOS (Standing for Basic Input & Output System) is a ROM chip, and is vital for the computer to initialize devices such as RAM, the CPU, etc. If there is ever an error there, a computer simply cannot boot.

From the options given, your answer given would be C. ROM.

I hope this helps!

8 0
2 years ago
Technician A says that generic scan tools must be able to read all generic OBD-II codes. Technician B says that all generic scan
Likurg_2 [28]

Answer:

A. Technicians A and B

Explanation:

When we're talking about generic scanners and about all OBD-II codes, in this case, both technician A and B is the correct answer. Because we can scan all OBD-II codes with a generic scan.

But the technician A just says generic tools must be able to read all generic OBD-II codes and technicians B just says generic scan tools must be able to read manufacture OBD-II code, both are correct.

4 0
3 years ago
Why star topology is more reliable than bus or ring topologies
Valentin [98]

Answer:

<h3><em><u>simple </u></em><em><u>ans</u></em></h3>

Explanation:

<h2><em><u>it </u></em><em><u>is </u></em><em><u>because </u></em><em><u>as </u></em><em><u>it </u></em><em><u>has </u></em><em><u>server </u></em><em><u>computer </u></em><em><u>and </u></em><em><u>no </u></em><em><u>one </u></em><em><u>are </u></em><em><u>free </u></em><em><u>as </u></em><em><u>other </u></em><em><u>topology </u></em><em><u>.</u></em><em><u>.</u></em><em><u>.</u></em><em><u>.</u></em><em><u>.</u></em><em><u>.</u></em></h2>

<h2><em><u>client </u></em><em><u>computer </u></em><em><u>should </u></em><em><u>ask </u></em><em><u>server </u></em><em><u>to </u></em><em><u>share </u></em><em><u>any </u></em><em><u>information </u></em><em><u>ideas </u></em><em><u>etc.</u></em></h2>

<em><u>this </u></em><em><u>much.</u></em><em><u>.</u></em><em><u>.</u></em><em><u>.</u></em>

<h2><em><u>follow</u></em></h2>
8 0
1 year ago
Read 2 more answers
Cloud vendors that are hosting hardware, operating system, database, and other software, which clients can then use to build the
iren2701 [21]

Answer:

a. Software as a Service.

Explanation:

These Cloud vendors are said to be providing Software as a Service. This is because regardless of that the underlying specs are in regards to hardware, operating systems, database, etc. The vendor is selling a subscription to their cloud software which bundles all of these services together. Therefore, what they are ultimately providing is a Software that the individual can use as a service, and enjoy all of the included benefits/capabilities.

8 0
2 years ago
To remove a header or footer from a document you can open the header and footer and manually delete the content true or false
romanna [79]

this is true...........................

6 0
3 years ago
Other questions:
  • What does the following statement do? vector v(10, 2);
    6·1 answer
  • i set up an account and paid the yearly fee, now it's asking me to join. i've tried to log in and brainly isn't accepting my ema
    8·1 answer
  • PLEASE HELP!!!
    12·1 answer
  • Suppose you own a travel agency in a large city. You have many corporate clients, but growth has slowed somewhat Some long-term
    15·1 answer
  • To use   ( 2 complement ) answer it (101101)2 – (1100)2 =   (                    )2
    12·1 answer
  • HELP BRAINLIEST FOR RIGHT ANSWER
    9·2 answers
  • What symbol indicates that material has been copyrighted?
    8·2 answers
  • ARGENT !!20 POINTS <br> А ________ translates commands from a computer to draw lines on paper.
    10·2 answers
  • ______________ are used to store information that will be referenced and manipulated in a computer program. They label data with
    6·1 answer
  • Various types of mouse pointer<br>​
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!