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
Llana [10]
3 years ago
12

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. I believe it's supposed to use nested loops, but I can only get it to repeat the whole word backwards x times.
ex.
Input a String:
code
Input an integer:
3
eeedddoooccc
Computers and Technology
1 answer:
il63 [147K]3 years ago
8 0

import java.util.*;

public class myClass {

public static void main(String args[]) {

Scanner scan = new Scanner(System.in);

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

String str = scan.nextLine();

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

int num = scan.nextInt();

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

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

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

}

}

}

}

You might be interested in
Nathan wants to create multiple worksheet containing common formatting styles for his team members. Which file extension helps h
Gnoma [55]
Templates help Nathan to create multiple worksheets with common styles. He needs to save them with the xls extension.
6 0
4 years ago
For a list of numbers entered by the user and terminated by 0, find the sum of the positive number and the sum of the negative n
Katena32 [7]

Summarize all positive numbers as follows: + It's good. The total of all negative numbers is:, write it down. + Unfavorable.

<h3>What is C++ language?</h3>

C++ language is defined as a general-purpose programming language that supports procedural, object-oriented, and generic programming and is case-sensitive and free-form.  As well as being used for in-game programming, software engineering, data structures, and other things, C++ is also utilized to create browsers, operating systems, and applications.

An application that adds all positive integers and stores them in variables, as well as adding all negative numbers and storing them in variables. The software should print the values for both variables at the conclusion and compute their average. When the user enters a zero, the software should terminate.

Thus, summarize all positive numbers as follows: + It's good. The total of all negative numbers is:, write it down. + Unfavorable.

To learn more about C++ language, refer to the link below:

brainly.com/question/1516497

#SPJ1

8 0
2 years ago
An email message containing a warning related to a non-existent computer security threat, asking a user to delete system files f
LenKa [72]

Answer: Virus Hoax

Explanation:

A computer virus hoax is a message that warns someone of a false virus threat. It is a a chain email that encourages who ever has received the message to pass it to other people as a form of warning.

5 0
3 years ago
Validation ensures that a website looks good.<br> True or False
Nezavi [6.7K]
The answer would be false. Validation doesn't have to do with a website looking good, validation is just checking the quality of the logic and backing up a statement with information that proves a statement to be true
8 0
4 years ago
The Boolean Foundation hosted a raffle to raise money for charity and used a computer program to notify the participants about t
irinina [24]

Answer:

The function is as follows:

void sendEmail(string name, string prize, string win_lose){

cout << "Dear "<<name<<", " << endl;

cout << "You are the "<<win_lose<<" of our raffle for charity." << endl;

cout << "The prize was: "<<prize<< endl;

cout << "Thank you for giving to charity!" << endl;

cout << "Sincerely," << endl;

cout << "The Boolean Foundation" << endl;

}

Explanation:

This defines the function along the three parameters

void sendEmail(string name, string prize, string win_lose){

This prints the salutation with the person's name

cout << "Dear "<<name<<", " << endl;

This prints if the person won or lost

cout << "You are the "<<win_lose<<" of our raffle for charity." << endl;

This prints the prize, if any

cout << "The prize was: "<<prize<< endl;

The following is the closing remark

<em>cout << "Thank you for giving to charity!" << endl;</em>

<em>cout << "Sincerely," << endl;</em>

<em>cout << "The Boolean Foundation" << endl;</em>

<em>}</em>

6 0
3 years ago
Other questions:
  • A _______ record is responsible for resolving an ip to a domain name.
    9·1 answer
  • Which osi reference model layer is responsible for transmitting information on computers connected to the same local area networ
    6·1 answer
  • What do newly PivotTables look like?
    9·1 answer
  • )what item is at the front of the list after these statements are executed?
    15·1 answer
  • Who where the romanovs? What happened to them ?
    7·1 answer
  • Why is it important to recognize web adress endings ?
    13·1 answer
  • I need to know what is share market plssss
    8·2 answers
  • If you decide you want to meet someone you met online, what should you do first? A. Tell your best friend. B. Call the person yo
    12·1 answer
  • Make a list of any four computer that were used in the history of computer.​
    6·1 answer
  • 1.Which thematic group uses technology to direct the behavior of dynamical systems, ensuring that they behave in a predictable m
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!