answer.
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
Llana [10]
2 years ago
12

Write code which takes a user input of a String and an integer. The code should print each letter of the String the number of ti

mes the user inputted in reverse order. I believe it's supposed to use nested loops, but I can only get it to repeat the whole word backwards x times.
ex.
Input a String:
code
Input an integer:
3
eeedddoooccc
Computers and Technology
1 answer:
il63 [147K]2 years ago
8 0

import java.util.*;

public class myClass {

public static void main(String args[]) {

Scanner scan = new Scanner(System.in);

System.out.print("Input a String: ");

String str = scan.nextLine();

System.out.print("Input an integer: ");

int num = scan.nextInt();

for(int i=str.length()-1; i>=0; i--) {

for(int j=0; j<num; j++) {

System.out.print(str.charAt(i));

}

}

}

}

You might be interested in
Anna bought a box of blueberries for £7. She used 700 grams for a cheesecake and she has 450 grams left. How much did the bluebe
xxTIMURxx [149]

0.61 (rounded up)

Explanation:

You add both 700 and 450 which will give you 1150g

You then divide 1150 by 100 which gives you 11.5

Then divide 7 by 11.5 which will give you 0.61 as cost of every 100 grams

8 0
2 years ago
How do i use autofill to fill the range A9:H11 with the formatting from the range A7:H8
myrzilka [38]

Answer:

See the explanation below

Explanation:

An image showing the range of cells is attached.

The task is to use autofill to fill the range of A9:H11 with the formatting from the range of A7:H8;

As shown in the image some cells are already filled. First, we highlight the cells A7:H8 and then we move the cursor to the end of the selected cell (precisely end of H8) over what is called Fill Handle and the cursor then turns into a black plus sign.

Hold down the right mouse button and drag over the wanted range of cells (A9:H11) and release.

A list of options is presented, this options include:

Copy cells, Fill series, Fill formatting only, Fill without formatting and so on.

From the displayed options, we select "Fill formatting only" and the cell (A9:H11) will have the same formatting as the cells (A7:H8).

3 0
2 years ago
Mitchell is assisting her teacher in a project by entering data into the spreadsheet. Which types of data can Michelle enter in
Rainbow [258]

Hello, Paper, types of data that Michelle can enter into a cell is,

• Data – values, usually numbers but can be letters or a combination of both.

• Labels – headings and descriptions to make the spreadsheet easier to understand.

• Formulas – calculations that update automatically if referenced data changes.

Hope this helped!

4 0
2 years ago
Read 2 more answers
Which option will you use to expose your presentation to the audience?
Liula [17]
<span>Which option will you use to expose your presentation to the audience?
</span><span>B)Slide Show</span>
6 0
2 years ago
Read 2 more answers
Which type of styles can be applied to a word, phrase, or sentence?
Anna [14]

Answer:

I think the answer is going to be paragraph

6 0
2 years ago
Other questions:
  • What conclusion can be made about the state of the program when the while loop terminates? Assume answer is a declared and initi
    5·1 answer
  • Programming challenge description: Write a program that, given two binary numbers represented as strings, prints their sum in bi
    6·1 answer
  • You are a technical consultant for many businesses in your community. One of your clients, a small law firm, has a single Active
    14·1 answer
  • A network design engineer has been asked to design the IP addressing scheme for a customer network. The network will use IP addr
    6·1 answer
  • Write a function called sum_scores. It should take four arguments, where each argument is the team's score for that quarter. It
    6·1 answer
  • A summer camp offers a morning session and an afternoon session.
    5·1 answer
  • Write a function named file_stats that takes one string parameter (in_file) that is the name of an existing text file. The funct
    7·1 answer
  • When considering server consolidation, plan on running ___________ vCPUs per core.a. 1 to 2b. 3 to 4c. 4 to 6d. 6 to 8
    7·1 answer
  • PLEASE HELP!!~~
    7·1 answer
  • An aviation tracking system maintains flight records for equipment and personnel. The system is a critical command and control s
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!