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
What is the best anime that you like the most (give me 3 plz)
Dmitry [639]

Answer:

The rising of shied hero, last hope, and dragon pilot.

4 0
3 years ago
Read 2 more answers
How do you change the Background image or picture on Windows desktop?
Mademuasel [1]
Go to settings, personalization, then background. Select the photo file you want to use. Should look like this.

5 0
3 years ago
A technician is training a new hire on sealing an RJ-45 connector to the end of an Ethernet cable. Which tool is the technician
Aleonysh [2.5K]

<em>The answer is Crimper. </em>

<em> </em>

<em>Crimper is a networking device that would allow RJ-45 pins to get attached to UTP(Unshielded Twister Pair), CATs (Category Ns) and STPs (Shielded Twisted Pair) Cables. These are common type of cables used in computer networking. A crimper looks like a pliers only it has narrow ends with a hole where you would put RJ-45 devices together with the cables. In order to make the cable hold on to the RJ-45, the two hands must be squeezed together with an exact force (not too much force). Once the crimper made a sound, that means, your RJ-45 is now locked with the cables inside.  </em>

<em> </em>

<em>You must be very careful when using this device. Sometimes crimpers has blades that could peel off cables or cut them for alignment and proper attachments. A pair of gloves and googles are also advisable to wear when you use this device for safety measures.</em>

8 0
3 years ago
True or False: At the Company level, users will only have access to view projects to which they have been specifically granted a
Viktor [21]

Answer:here the link

Explanation:

4 0
3 years ago
Read 2 more answers
How to send an email to multiple recipients individually.
zheka24 [161]

Answer:

The BCC method

Explanation:

4 0
2 years ago
Other questions:
  • If a gas gosts 3.60 per gallon how much doe sit cost to drive 500 miles in the city
    5·1 answer
  • JavaScript
    10·1 answer
  • I just started game development using unity, I’m trying to control my sphere moving on a flat surface using the W,A,S,D keys, if
    11·1 answer
  • The arithmetic logic unit (alu) controls all of the functions performed by the computer's other components and processes all the
    7·1 answer
  • Out of a list of the values 8, 3, 30, 5, 15, and 6, what result would the MIN function return?
    9·2 answers
  • Software is the word for:
    15·1 answer
  • How to make a project using PID and thermacouple
    11·1 answer
  • Brainliest
    13·2 answers
  • Will, there be any presents this year
    15·1 answer
  • The technique that allows you to have multiple logical lans operating on the same physical equipment is known as a.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!