Decent pay
Using a loop to display the following phrase one hundred times:
"I will never work for peanuts. Amigo"
Display each value on a new line.
Requirements:
1. The program should not read text from the keyboard.
2. The program should display text on the screen.
3. The program should display the text specified in the task 100 times.
4. The program must use a for loop or a while loop.
my solution
package com.codegym.task.task04.task0440;
/*
Decent pay
*/
public class Solution {
public static void main(String[] args) {
//write your code here
String s = "I will never work for peanuts. Amigo";
for(int i =0; i<100; i++){
System.out.println("\"" + s + "\"");
}
}
}
please help me in the issue....what is there wrong in the solution?
below code solution not being verified
Resolved
Comments (1)
- Popular
- New
- Old
You must be signed in to leave a comment
Shubham ranawat
24 October 2018, 10:46
remove " \" ". the string should be printed without double quotes
0