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
You are the security administrator for your company. You have been informed by human resources that one of the employees in acco
andreyandreev [35.5K]

Answer:

The answer is "option d".

Explanation:

When an employee is fired so, their account should be closed, and the employee records should be maintained over a certain time specified by the rules and procedures of the company. and other options can be defined as:

  • In option a,  It is not important to delete the user account because later on, the company would need info about that account.
  • In option b, There's no need to talk to the superior of the employer.
  • In option c,  change the user password is not enough to update the user's password; the account should also be deleted.
5 0
3 years ago
Which of the following is powered by energy from earth's interior ?
butalik [34]
I think the correct answer from the choices listed above is option D. It would be plate tectonics that is powered by energy from Earth's interior since it is the only choice that is underneath the surface of the Earth. Hope this answers the question. Have a nice day.
3 0
3 years ago
What are 4 ratios equal to 60%?
Elza [17]
6:10
3:5
9:15
12:20

These are all equal to 60%
3 0
3 years ago
Read 2 more answers
Before you create a pivot table, it is important to __.
Reptile [31]

Before you create a pivot table, it is important to <em><u>Create a database</u></em>.

Option: A

<u>Procedure to create Pivot Table: </u>

1. Select the cells and table in the sheet containing the data you want to use.

2. Go to the Insert tab and click the PivotTable command.

3. In the dialog box ‘Create PivotTable’ will appear. Choose your settings, then click OK. In our example, we will use Sheet1 as our source data and insert the PivotTable on a new worksheet.

4. The Field List and blank PivotTable will appear on a new worksheet.

5. Once you create a PivotTable, you have to decide which fields to add. Each field has a simple column header from the source data. In the PivotTable Field List, check the box for each field you want to add.  

6. The selected fields will be added to one of the four areas below the Field List. In our example, the Salesman field has been added to the Rows area, while the Order Amount has been added to the Values area. Alternatively, you can click, hold, and drag a field to the desired area.

7. The PivotTable values will calculate and summarize the selected fields. In our example, the PivotTable shows the amount sold by each salesman.

8 0
3 years ago
Read 2 more answers
A website theme has most to do with a site's:
krek1111 [17]
Your answer is overall design
6 0
2 years ago
Read 2 more answers
Other questions:
  • After several incidents in __________ the company’s computer systems were not ready to support new products, the CEO established
    12·1 answer
  • Kumar was working on his term paper and had not saved his work before the battery died on his laptop. He panics because the pape
    12·1 answer
  • which tag does not display the text in the browser window and makes the sources code mode readable ?​
    6·1 answer
  • If a simple pipelined processor is super-pipelined by a factor of 3 (the ALU takes 3 cycles instead of one for the smallest oper
    15·1 answer
  • Which of the following is NOT considered a step in the problem solving process. A Try B Discover C Prepare D Define
    12·1 answer
  • Select the correct answer.
    6·1 answer
  • Bob has 2 candy bars he is fat what hapennes
    5·2 answers
  • In a non-price rationing system, consumers receive goods and services first-come, first served. Give me an example of a time whe
    8·1 answer
  • Lab 8-1: Working with Boot Loader and Runlevels what is the root password
    9·1 answer
  • Discussion Topic
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!