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]
4 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]4 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
If some1 emails u and u want to know who it was how do u find that out
bonufazy [111]
The name should pop up on the email saying sent by? 
5 0
3 years ago
Read 2 more answers
You are looking for a backup that copies only the files that have changes since the last full backup. Which of the following wil
adelina 88 [10]

Answer: d. incremental backup

Explanation:

In incremental backup it copies only the files that have changed since the last full backup. It does not backup all the files just like the full backup. it however backup those copies into the  system which has changed since the last backup.

In doing  so it just increases the efficiency and performance of the backup procedure. This process is basically preferred when the amount of file to be backup is huge and there is not enough time to do a full backup.

Increment backup also use less disk space.

Cloud backup uses most increment backup for its application.

6 0
3 years ago
What is Brainly?<br><br> A.Yes<br> B.No
mr Goodwill [35]

Answer: C: Yesn't

Explanation:

3 0
3 years ago
Read 2 more answers
Consumers who wish to make a purchase from other consumer on ebay need tl
il63 [147K]

Answer:

Bid on item

Explanation:

Consumers who wish to make a purchase from other consumer on ebay need to first of all bid on the item. This is done by specifying the price in which the purchase should be made.

When this is done, the seller contacts the buyer if he/she’s okay with the price of the goods and services and other formalities are discussed.

8 0
3 years ago
What is the formula for determining the number of possible hosts on a network?
fredd [130]
2**(32 - netmask) - 2 = number of nodes available

The netmask is in CIDR (Common Internet Domain Routing) notation, without the slash.

One of the nodes would be needed for a router or else you can't communicate with other networks.
3 0
3 years ago
Other questions:
  • A bitmap picture can be represented by hexadecimal numbers. Each two-digit hexadecimal number represents a row. To convert a num
    14·1 answer
  • Are headphones considered a computer? Why or why not?
    13·2 answers
  • Each time the user selects an item from a list box in a web page, a postback occurs, the web page will redisplay, and the page_l
    12·1 answer
  • The Windows Remote Desktop Web connection that allows users to connect to a work or home computer and access files is considered
    7·2 answers
  • Respond to the following in a paragraph of no less than 125 words. Describe the steps to active listening.
    7·2 answers
  • The processing power of a computing device is measured by its _____.
    10·1 answer
  • NAT is able to stop ________. Group of answer choices a) scanning probes sniffers from learning anything about the internal IP a
    8·2 answers
  • Examples of analog computer
    8·1 answer
  • _______________ is a computer networking protocol used by hosts to retrieve IP address assignments.
    11·1 answer
  • Greg is concerned about the use of ddos attack tools against his organization, so he purchased a mitigation service from his isp
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!