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
You have been having issues with your printer, so you decide to learn more about how the printer works. You learn that if you re
FromTheMoon [43]

Answer:

printer

Explanation:

i think im right

8 0
3 years ago
How to transfer crypto from coinbase to coinbase wallet
posledela

Answer:

Open Coinbase Wallet on your mobile device.

Tap to go to your Settings.

Tap Buy or Transfer.

Select the supported crypto.

Enter the amount you want to transfer then tap Continue.

Follow the remaining steps to complete your transfer.

7 0
2 years ago
Juhfvehrfwhedfhwkefhkujhiuyuiyuiyiyh
maw [93]

Answer:

blah

blah

blah..⁉️

Explanation:

juhfvehrfwhedfhwkefhkujhiuyuiyuiyiyh

⁉️

8 0
3 years ago
Why is Apple using social media ?
jeka57 [31]

Apple uses social media to promote their products and increase user-engagement. This is a very effective method of advertising.

6 0
4 years ago
Design the logic for a program that outputs every number from 1 through 15.
ankoles [38]
Not sure what programming language, but i'll use Java

print (1)
print (2)
print (3)
print (4)
print (5)
print (6)
print (7)
print (8)
print (9)
print (10)
print (11)
print (12)
print (13)
print (14)
print (15)
3 0
3 years ago
Read 2 more answers
Other questions:
  • Ruth knows the name of a presentation file and the folder it's in, but there are many files in that folder. How can Ruth quickly
    8·1 answer
  • ____________________ software is a type of security software designed to identify and neutralize web bugs, ad-serving cookies, a
    8·1 answer
  • 1 Explain the difference between using a computer program and programming a computer.
    12·1 answer
  • Your company has 1,000 users in a Microsoft Office 365 subscription. A Power BI administrator named Admin1 creates 20 dashboards
    14·1 answer
  • Write a Java class called getName that prompts a user for their name and then displays "Hello, [name here]!" The flow should loo
    14·1 answer
  • In Microsoft word when you highlight existing text you want to replace , you're in?
    15·1 answer
  • A user who enters americanbank.net into a web browser instead of the correct americanbank and is then taken to a fake look-alike
    11·2 answers
  • In information security, a specification of a model to be followed during the design, selection, and initial and ongoing impleme
    5·1 answer
  • In which of the following scenarios would you choose to embed versus import data?
    8·1 answer
  • Which ipconfig command switch would a technician use to display detailed information (such as dns servers and mac addresses)?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!