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
vovangra [49]
3 years ago
15

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.
Sample run:

Input a String:
code
Input an integer:
3
eeedddoooccc


Note: Write In Java
Thank You...
Computers and Technology
2 answers:
Alexus [3.1K]3 years ago
7 0

import java.util.Scanner;

public class JavaApplication70 {

   public static void main(String[] args) {

       Scanner scan = new Scanner(System.in);

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

       String txt = scan.nextLine();

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

       int num = scan.nextInt();

       String newTxt = "";

       int w = 0;

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

           char c = txt.charAt(i);

           while (w < num){

               newTxt += c;

               w++;

           }

           w = 0;

       }

       System.out.println(newTxt);

   }

   

}

I hope this helps!

Nesterboy [21]3 years ago
6 0

Answer:

import java.util.*;  

class Main {  

 public static void main(String args[]) {

   Scanner sc= new Scanner(System.in);

   

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

   String str = sc.nextLine();  

   

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

   int num = sc.nextInt();  

   

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

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

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

       }

   }

         

 }

}

Explanation:

There you go.

You might be interested in
If an engine has four cylinders and a total of 16 valves, how many valves would each cylinder have? A. Two B. One C. Four D. Thr
scZoUnD [109]
The correct response is C. Four.
6 0
3 years ago
Why are you unable to modify the budget file, when you have the allow full control ntfs permission?
Alinara [238K]

I don't really know the perfect answer to this but I would say because of todays technonlogy


3 0
3 years ago
Thomas asked his friend for a software suite. His friend had the software suite in his computer and he copied it into a small, r
Misha Larkins [42]

Answer:

The correct answer to the following question will be "Flash memory card".

Explanation:

A flash memory card seems to be a storage (small) medium which stores data or information on fordable or remote devices using non-volatile transistor technology hardware.

  • Most newer offerings include flash storage or memory chips, even though the development of other memory innovations is underway.
  • This would be the storage mechanism from which the configuration tool was replicated by Thomas' friend.
8 0
3 years ago
When doing a Risk assessment, what is one of the most important things to do?
GaryK [48]

Answer:

Determine who might be harmed and how.

8 0
2 years ago
Read 2 more answers
BOTH QUESTIONS ONLY FILL IN C++ CODEWrite a copy constructor for CarCounter that assigns origCarCounter.carCount to the construc
Alborosie

Answer:

im lost tell me a question then ill answer

Explanation:

4 0
3 years ago
Other questions:
  • What software refers to the on authorized and illegal duplication or sale of software
    10·1 answer
  • It is important that researchers design rigorous study methods to eliminate: a. inferences. b. the need for a CONSORT flow chart
    10·1 answer
  • Describe how to manage the workspace by putting each feature under the action it helps carry out
    8·1 answer
  • What does the merge &amp; center button in the alignment group on the home tab do?
    8·1 answer
  • Implement a java program to find the smallest distance between two neighbouring numbers in an array.
    7·1 answer
  • The region which satisfies all of the constraints in graphical linear programming is called the:
    8·1 answer
  • To answer the research question "How am I going to find the information I need on the tople?" the best thing Georgia should
    15·1 answer
  • What does the binary odometer show about representing large numbers​
    15·1 answer
  • Point out the wrong statement:
    7·1 answer
  • Como a contribuido el desarrollo tecnologico a mejorar la calidad debida de los seres humanos
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!