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
Which code snippet is the correct way to rewrite this in Semantic HTML?
xxMikexx [17]

Answer:

<div id="header">

<h1>Waketech</h1>

</div>

<header><h1>Waketech</h1></header>

Explanation:

I think thats the answer your welcome

8 0
1 year ago
Which statement about intellectual property is true? (CSI-7.6) Group of answer choices It is okay to use code you find on the in
nika2105 [10]

Answer:

Laws are in place to cover your creative work, which includes code you have written.

Explanation:

Copyright law can be defined as a set of formal rules granted by a government to protect an intellectual property by giving the owner an exclusive right to use while preventing any unauthorized access, use or duplication by others.

A copyright can be defined as an exclusive legal right granted to the owner of a creative work (intellectual property) to perform, print, record, and publish his or her work. Also, the owner is granted the sole right to authorize any other person to use the creative work.

For instance, copyright law which protects the sharing and downloading rights of music is known as the Digital Millennium Copyright Act (DMCA).

An intellectual property can be defined as an intangible and innovative creation of the mind that solely depends on human intellect.

Simply stated, an intellectual property is an intangible creation of the human mind, ideas, thoughts or intelligence. They include intellectual and artistic creations such as name, symbol, literary work, songs, graphic design, computer codes, inventions, etc.

Hence, laws are in place to cover a person's creative work, and it includes code he or she have written.

6 0
3 years ago
Ms Access is spreadsheet software.True or false​
Doss [256]

Answer: I'd say false.

Explanation: An example of a spreadsheet software would be MS Excel. Access does have an option to create a spreadsheet but it also has other uses.

6 0
3 years ago
Read 2 more answers
Which statement best describes the concept of usability?
nordsb [41]

Usability emphasizes utility over aesthetics  statement best describes the concept of usability.

B.  Usability emphasizes utility over aesthetics.

<u>Explanation:</u>

Usability mainly speaks about the utility of an item. There are many wastes created in home and work place and those are sometimes thrown without knowing that it can be re-used for another purpose.

It is always better to re-use the product without considering aesthetic aspects though aesthetic is equally important. We can make the old objects to create a new one.

There are many videos in the social media to make the old objects to be used as a sub-product to create a new object and sometimes it looks better than an old one.

4 0
3 years ago
Read 2 more answers
A virus that is embedded in the automatically executing scipts commonly found in word processors, spreadsheets, and database app
schepotkina [342]

Answer:

macro virus

Explanation:

Macro virus -

A micro virus is written in a micro language  , where the programming language is present in the application of software like the powerpoint , excel , microsoft office , word processor , etc.

These virus gets activated as soon as the file is opened and then the virus starts to spread all over the system .

The virus may be send via email , and as soon as the file is opened , the macro virus gets activated.

Hence, from the given information of the question,

The correct term is macro virus.

6 0
3 years ago
Read 2 more answers
Other questions:
  • Wendy Patel is entering college and plans to take the necessary classes to obtain a degree in architecture. Research the program
    12·1 answer
  • Activity 1: Matched pairs or independent/separate samples? For each of the prompts below, decide whether the parameter of intere
    11·1 answer
  • Given that arrayIntValues [MAX_ROWS][MAX_COLUMNS] is a 2 dimensional array of positive integers, write a C++ function Even to fi
    15·1 answer
  • To create a new query in Design view, click CREATE on the ribbon to display the CREATE tab and then click the ____ button to cre
    9·1 answer
  • Run a Monte Carlo simulation on this vector representing the countries of the 8 runners in this race: runners &lt;- c("Jamaica",
    14·1 answer
  • Which option is used to ensure the integrity and authenticity of a Word document but requires additional services to be availabl
    5·2 answers
  • I need help!!!! 1.04
    9·1 answer
  • What read a page on website​
    15·1 answer
  • When spraying pesticide wear and protective eyeglass​
    13·2 answers
  • What is added to brining liquid to add flavour​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!