Can anyone help me with this code, without changing it,...just findmy errors ple
ID: 3616473 • Letter: C
Question
Can anyone help me with this code, without changing it,...just findmy errors pleaseThanks
import java.util.*;
class PrintDot
{
public static void main(String[ ] args)
{
int number=0;
Scanner scap= new Scanner(System.in);
System.out.println(“How many ampersands to print?“);
number=scap.nextInt();
ppp(number);
} \end of main
void ppp(nnn)
{ for(ik=0; ik<nnn; ik++)
System.out.print(‘&’);
System.out.println();
} \end of ppp
} \end of class
Explanation / Answer
/* The changes are highlighted */ import java.util.*; class PrintDot { public static void main(String[ ] args) { int number=0; Scanner scap= new Scanner(System.in); System.out.println("Howmany ampersands to print? "); number=scap.nextInt(); PrintDot.ppp(number); } //end of main public static void ppp(int nnn) { for (int ik=0; ikRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.