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
chubhunter [2.5K]
3 years ago
7

Write a program in Java to input a letter. If it is an uppercase letter then

Computers and Technology
1 answer:
Vadim26 [7]3 years ago
7 0

Answer:

The program is as follows:

import java.util.*;

public class Main{

public static void main(String[] args) {

 Scanner input = new Scanner(System.in);

 char chr;

 System.out.print("Input Character: ");

 chr = input.next().charAt(0);

 if(Character.isUpperCase(chr) == true){      chr+=5;  }

 else{      chr-=3;  }

 System.out.println("Encode Character: "+chr);

}

}

Explanation:

This declares the character

 char chr;

This prompts for input

 System.out.print("Input Character: ");

This gets the input from the user

 chr = input.next().charAt(0);

This checks for uppercase; if true, it is encoded by the next 5th

<em>  if(Character.isUpperCase(chr) == true){      chr+=5;  }</em>

If lowercase, it is encoded by the previous 3rd

 else{      chr-=3;  }

This prints the encoded character

 System.out.println("Encode Character: "+chr);

You might be interested in
What is Tone's Core Move call in Titan Fall 2?
AleksandrR [38]

Answer:

Tones Core is called "Salvo Core"

8 0
3 years ago
A camera in manual mode means of the camera will make all the adjustments for the photographer
galben [10]
Manual mode is when the photographer makes all the adjustments themself
7 0
4 years ago
A(n) _____ is a fake online persona created to promote a particular point of view, often in praise of a firm, product, or indivi
drek231 [11]

Answer:

<u>Sock puppet</u>

Explanation:

A sock puppet, a reference to a puppet created by placing a sock over one's hand, is a misleading or fake online identity created to promote a particular point of view, often in praise of a firm, organization, product, or individual; to manipulate public opinion or to argue, bully or review products. Regardless of the purpose it was created for, sock puppets are rarely welcome in online communities and forums.

4 0
4 years ago
Lesson 12: while loops with the farmer. Number 9.
Vikki [24]

Answer:

just repeat the move forward as many times until you get to the hole and fill 1

Explanation:

i think this might work

if it does can i have brainliest

3 0
3 years ago
Read 2 more answers
The Go To feature can be accessed from which of the following dialog boxes?
Aliun [14]

Answer:

hoose the answer.

•Font

•Open

•Insert Hyperlink

Explanation:

4 0
3 years ago
Other questions:
  • Why is it critical to provide proper treatment for minor and moderate sports injuries within the first 48 hours after sustaining
    14·1 answer
  • Write a static method named textcount that takes a scanner representing a file as a parameter and that reports various statistic
    11·1 answer
  • The text discusses three different steps when processing input. Which of the following is (are) one of those steps? (Check all t
    8·1 answer
  • This program outputs a downwards facing arrow composed of a rectangle and a right triangle. The arrow dimensions are defined by
    8·1 answer
  • how does modern information technology has affected society ?? Need help on how it has affected society
    10·1 answer
  • Which type of styles can be applied to a word, phrase, or sentence?
    7·1 answer
  • What is an example of CT SO?
    9·1 answer
  • To calculate subtotal for a table, the first step is to use the ____ button on the table tools design tab.
    15·1 answer
  • Write the Flowchart to find Even number between 1 to 50<br>​
    9·1 answer
  • Requirements description:
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!