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
How computer viruses spread from one computer to another​
morpeh [17]
Viruses spread when the software or documents they get attached to are transferred from one computer to another using a network, a disk, file sharing methods, or through infected e-mail attachments. Some viruses use different stealth strategies to avoid their detection from anti-virus software.
8 0
3 years ago
________ can be written only once. The data cannot be erased or written over once it is saved.​
notka56 [123]

Answer:

WORM (Write Once, Read Many)

Explanation:

The full meaning which means Write Once, Read Many implies that data can only be entered (or better put, written) once. Once the data has been written, the data can not be updated or deleted. However, the data being stored on WORM can be read as many times, as possible.

Hence, WORM answers the question.

6 0
3 years ago
Which of the following are some popular debugging techniques?
topjm [15]

Answer:

a fix any syntax bugs. I looked it up on the internet so you should be good good luck on your test

8 0
3 years ago
What are some ways to access the Excel Help window? Check all that apply. clicking and dragging the zoom slider on the status ba
Fudgin [204]

double-clicking the title bar

clicking the question mark in the upper-right corner of the interface

8 0
4 years ago
Read 2 more answers
Can someone help me with the 2.4 code practice question 2 on Edhesive???
Law Incorporation [45]

Answer:

sure, just show me the problem

5 0
4 years ago
Other questions:
  • One guideline for writing content for the web is to use ____ space to visually separate sections of content.
    15·1 answer
  • Complete the following statements by choosing the correct answer from the drop-down menus.
    14·1 answer
  • It is always better to run over and give more information when you are giving a presentation versus quitting on time. true false
    15·2 answers
  • What is the Documenter?
    10·1 answer
  • If you were investigating login issues on a Windows computer, which portion of the Event Viewer logs would be a good place to st
    7·1 answer
  • Alyson would like to see a list of all of the applications installed on her computer. What is the easiest way for her to do this
    8·1 answer
  • A browser is a program that allow
    11·1 answer
  • Cual es la relacion existe entre TENGNOLOGIA y la PRODUCCION DE ENERGIA
    8·1 answer
  • Convert Fahrenheit to Celsius using this formula: F = (9/5)*C+32
    5·1 answer
  • Help please!, explain what is missing and what needs to be changed if anything.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!