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 times 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

Answers

Answer 1
Answer:

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));

}

}

}

}


Related Questions

Microsoft word 365 allows cells to be split into how many columns
Should I get hollow knight, hyper light drifter, Celeste, or stardew valley for switch
Find the basic period and basic frequency of the function g(t)=8cos(10πt)+sin(15πt)
What type of result does the MATCH function, when used on its own, return?
What is Interface in computers

What are the differences betweenCONS, LIST, and APPEND?

Answers

Answer:

These all are constructors.

CONS

(CONS A B)

makes a pair like this:   (A . B)  

In other words, A is the CAR of the pair; B is the CDR of the pair.

For  example:

(CONS 4 5) ==> (4 . 5)

(CONS 4 '(5 6)) ==> (4 5 6)

[The pair (4 . (5 6)) is the same thing as (4 5 6)].

APPEND  

(APPEND A B)

makes a new list by replacing the final nil in A with the list B. A and  

B must be proper lists.

For example:

(APPEND '(4) '(5 6)) ==> (4 5 6)

This takes any amount of number and put in this order

LIST  

In this ,it will return a list whose elements are value of arguments in the order as it appeared in the LIST.It can take any amount of parameters

For example,

(LIST 4) ==> (4)

(LIST 4 5) ==> (4 5)

(LIST 4 5 '(6 7)) ==> (4 5 (6 7))

(LIST (+ 5 6)(* 5 6)) ==> (8 9)

What did networks of the 1960s use to connect computers?telephone lines

wireless technology

television signals

telegraph cables

Answers

Answer:

Explanation:

Telephone lines

You wrote a list of steps the user will take to perform a task. Which statement is true about this step?You have drawn pictures of what your screens will look like and identified the input-process-output that occurs on each
screen.
O Your app is functioning and ready to test.
O You have defined a use case.
O In this step, you defined your target audience and main goal.

Answers

The statements that are true about this step are:

  • In this step, you defined your target audience and main goal.
  • You have drawn pictures of what your screens will look like and identified the input-process-output that occurs on each screen.
  • Your app is functioning and ready to test.

What is a an app?

A mobile application, sometimes known as an app, is a computer program or software application that is meant to operate on a mobile device, such as a phone, tablet, or watch.

An app is a software program that allows users to do certain functions on their mobile or desktop device. Apps are either pre-installed on your device or downloaded through a specialized app store, such as the Apple App Store. Apps are usually created in a variety of programming languages.

Learn more about Apps:
brainly.com/question/11070666
#SPJ1

Obtain the 9’s complement of the following eight-digit decimal numbers:12349876

89009951

Answers

Answer:

87650123

10990048

Explanation:

We have to find the 9's compliment of the given numbers

Now for the given data

a) given = 12349876

9's complement of the given number is calculated as:

99999999 - 12349876

or

= 87650123

b)  given number = 89009951

9's complement for the given number 89009951  is calculated as:

99999999 - 89009951

or

= 10990048

One advantage of the Second generation of programming language is that it is machine dependent. True or False

Answers

Answer:

I THINK FALSE

Explanation:

Jill needs to create a chart for technology club that shows what percentage of total students in the school play video games. Which chart or graph should she use? Bar graph Column chart Line graph Pie chart

Answers

Answer:

It's pie chart because it shows the percentage of multiple things.

Explanation:

And I did an exam aced it and got this question right.