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!
Following are the java program to input string:
Program Explanation:
Import package. Defining a class Main. Inside the class, the main method is defined. Inside the main method two String variable "val, next", and three integer variable "n,x, j" is defined. In the next step, a scanner class object is declared that inputs string and integer variable value. After input value a loop is defined that holds a sting value and define a while loop that seprate the value and calculate its value and print its value.Program:
import java.util.*;//import package
public class Main //defining a class Main
{
public static void main(String[] ar)//defining a main method
{
String val,next="";//defining a String variable
int n,x=0,j;//defining an integer variable
Scanner bd = new Scanner(System.in);//defining a Scanner class object to input value
System.out.println("Input a String:");//print message
val= bd.nextLine();//input String value
System.out.println("Input an integer:");//print message
n = bd.nextInt();//input integer value
for (j = val.length()-1; j >= 0; j--)//defining a for loop that calculate a value
{
char c = val.charAt(j);//defining a char variable that holds character value of string
while (x < n)//defining loop for compare value
{
next += c;//incrementing the character value
x++;//incrementing integer value
}
x = 0;
}
System.out.println(next);//print value
}
}
Output:
Please find the attached file.
Learn more:
brainly.com/question/18844825
which componet is the smallest unit in a spreadsheet
The cell is the smallest unit in a spreadsheet
How did the invention of an airplane totally change people’s views of the world?
about "How can computer help us in our life?
Answer:
Explanation:
Computer also facilitate comfort to our life and provides convenience. For transportation, it facilitate the way people travel. Airways, Roadways and waterways uses computers to control their operation. It saves time and relieve severity of traveling difficulties.
Which range function will generate a list of all even numbers between 12 and 84 inclusive? range (12, 86, 2) range (11, 84, 3) range (12, 86, 4) range (10, 84, 2)
Answer:
The answer is "range (12, 86, 2)".
Explanation:
The range() function generates a numerical sequence across items. In the above-selected choice, the range function is correct because it takes three parameter values "start, stop, and step". In this choice, it takes three number values "12, 86, and 2", in which 12 is the starting point, and 86 is the ending point, and 2 is used for print even numbers between them, that's why the other choice is wrong.
Which of the following is an example of a Syntax Error?
The program runs, but prints a warning to the console.
The program runs at first, but eventually crashes.
The program does not run at all.
O The program runs, but doesn't do what you expect.
Answer:
The correct answer is: "The program does not run at all."
Explanation:
The rules to write a program in any language are called syntax. The error in syntax of a language is called syntax error. Syntax errors are usually detected during the compilation of the program. The program cannot be run untill all syntax errors are removed.
So,
The correct answer is: "The program does not run at all."
Type a message (like “sir i soon saw bob was no osiris”) into the text field in the asciitohex.com webpage. Which of the encodings (binary, ASCII decimal, hexadecimal, or BASE64) is the most compact? Why?
Answer:
BASE64
Explanation:
The encoding c2lyIGkgc29vbiBzYXcgYm9iIHdhcyBubyBvc2lyaXM= is the shortest.
Answer:
BASE64
Explanation:
BASE64 is the most compact encoding because it is the shortest encoding of "sir i soon saw bob was no osiris".
Yvonne found an article online that relates to her research topic, but the article does not cite the author. What
should Yvonne do?
O She should decide to use the article without citing it.
O She should decide to avoid using the article.
O She should write the information in her own words.
O She should determine the website's credibility.
will mark brainliest
Answer:
d
Explanation:
bye
Yvonne found an article online that relates to her research topic, but the article does not cite the author. so she should determine the website's credibility.
How do you outline internet site credibility?Simply put, it is the distinction between a handsome web website online and one designed with a purpose. For many customers, their advent for your enterprise happens on your internet site. Your major goal, after they arrive, is to instill a feeling of trust.
Links to/from different websites display the web website online is well-respected. The credentials of the author(s) are valued. Articles include citations and references. News memories are few, however, include details.
Read more about the research topic:
https://brainly.com/question/25257437
#SPJ2
PLEASE HELP!! WILL MARK BRAINLEST
What positive and negative impact does Instagram have on you?
Instagram has many and negative impacts depending on what users are interacting and what posts are made.
Negative:
Toxic peopleDiscouraging commentsRude judgementNeed for popularityPositive:
A way to shareCommunication between friendsEncouraging commentsSomewhere to find inspirationThere's many more things, but I just listed a few that I can remember.
what does this map key show
Answer: where is the map key? I don't see it
Explanation:
what is the standard unit used to measure mass?
Answer:
the standard unit used to measure mass is gram.
Python problem:
Write a program in which the program guesses the number that the user is thinking about. Example of
output per screen:
Think of a number from 1 to 4.
Answer S (yes) or N (no) to my questions.
Is the number thought to be greater than 2? S
Is the number thought to be greater than 3? N
The number thought about is 3
See you next time!
print("Think of a number from 1 to 4")
print("Answer S (yes) or N (no) to my questions.")
choice = input("Is the number thought to be greater than 2? ")
if choice == "S":
choice = input("Is the number thought to be greater than 3? ")
if choice == "S":
print("The number thought about is 4")
elif choice == "N":
print("The number thought about is 3")
elif choice == "N":
choice = input("Is the number thought to be greater than 1? ")
if choice == "S":
print("The number thought about is 2")
elif choice == "N":
print("The number thought about is 1")
print("See you next time!")
This works for me. Best of luck!
Which term best describes the collection of technological systems made by engineers, technologists, and scientists that meets people's needs and improves their quality of life?
Answer:
The designed world.
Explanation:
The designed world is a term that best describes the collection of technological systems made by engineers, technologists, and scientists that meets people's needs and improves their quality of life.
Basically, a designed world gives an insight into a systematic collection of a design process which transforms technological systems, machines, tools, people, energy, time, and information to better change the world so as to improve and suit the needs or wants of the people.
For example, the city of Philadelphia, Lincoln, San Francisco in the United States of America is a good description of the designed world.
Which are reasons to use collaborative learning? Check all that apply.
to solve problems
to discuss topics
to save study time
to complete tasks
to study material
Plz help
Answer:
i say the answers are
A. to solve problems
B. to discuss topics)
D. to complete tasks
E. to study material
Explanation:
I say it's NOT (C. to save study time) because you are still taking times to study
Answer:
A, B, D, E
Explanation:
after processing ,data is converted into ____
Answer:
Information.
Explanation:
What is 16/17 simplified?
Who is Mr.Anonymous?
Answer:
me
Explanation:
me
Answer:
a random person
Explanation:
Which best describes what databases do?
They guarantee users find needed data.
They create categories for data.
They identify important data.
They enable users to search for data.
Answer:
a. they guarantee users find needed data.
This function chooses the screen to display based on the score.What is the correct way to call this function?
Answer:
checkWin();
Explanation:
its in the code
Answer:
checkWin ( ) ;
Explanation:
It is show inside the code
Need Brainiest
Need The Answers For Lesson 4: Wrapping Up Unit 1 Digital Photography Test.
Answer:
Explanation:
can you show me a ss?
If something is sustainable, then what is it?
Enduring
Brittle
Expensive
Short-term
Why does a folder change color when you click and drag a file over it
Pokémon Brick Bronze...
Well we dont need to get political but bronze
what is meant by GPS?
Answer:
The Global Positioning System.
Answer:
Global Positioning System
Explanation:
This is 10 points. Which line of code will display the variable num rounded to the nearest tenth?
A. print(num, round)
B. print(round(num, 1))
C. print(num rounded)
D.print(round(num,.1))
Answer:print(num, round)
Explanation:print(num, round)
Answer:
B trust me i got it correct
Explanation:
WILL GIVE BRAINLIEST!!!!!!!
MRV is able to is car that can do 0 degree turns and drive in any direction.
True
False
Answer:
True
Explanation:
Answer:
it is b true
Explanation:
plz i need BRAINLIEST can u give it to me plz
What is the index of 7 in this list?
that list being [5, 6, 10, 7, 3, 2.5]
7
4
2
3
Any brainliest beggars will be flagged
Answer:
-1 (out of range).
Explanation:
Index '7' cannot exist in 0-indexed array of size '6'.
If return type is 'Integer' out-of-range exception should be thrown.
[ 0, 1, 2, 3, 4, 5] :: indices. (length = 6)
[ 5, 6, 10, 7, 3, 2.5 ] :: elements.
Answer: 7
Explanation: got it right on edgen
10 EASY POINTS❗️
1. If I give brainlist, will one of my brainlist be gone?
2. How do I make a question with 5 points instead of 10?
Answer:
You can't make something 5 points bc 10 is the minimum I believe. As for the BRAINIEST I'm not sure
Answer:
your brainiest wont be gone and there should be a button under where you type the question to change the point value
why when you are on wifi it keeps kicking you off is your class during online learning
Answer:
because the is alot of people using wifi in the world so the wifi can be usad only for u so old the internet is going down
Explanation:
Animation is primarily a visual art, so in many cases, you could turn off the
soundtrack and still know what is happening.
Answer:
yes as long as the motions and form of the person,place,or thing that is being moved in a clear and clean way and strictly sticks to the story or title of what you may be watching, its all about the story being told rather than the sound that it makes.
Explanation:
Multirotor drones are a type of _______ aircraft.
a. recreational
b. manned
c. lighter-than-air aircraft
d. heavier-than-air
Answer:
C. lighter-than-air aircraft
Explanation:
A multirotor is a rotorcraft with more than two lift-generating rotors. An advantage of multirotor aircraft is the simpler rotor mechanics required for flight control. Multirotor drones are used by hobbyists so it could be recreational, but mostly it's used in radio control aircraft so not recreational. It's unmanned so it's not b. If not a or b it has to be c or d. Most of it's airborne time is it being lighter-than air. I'd choose c.