I have to write a program that repeats a sentence over a hundred times which also contains 8 random typos and have to have each sentence numbered.
the sentence is: I will never spam my friends again
the program's output should be
- I will never spam my friends again.
I will never spam my friends again.
etc.import java.util.Scanner; import java.lang.String; public class spam { public static void main(String[] args) { int i; int k; for(i = 0; i < 100; i++) { String spam = "I will never spam my friends again"; System.out.println(spam); } } } }
Now I know this isn't much, but what I would like to know is where I should go about. I'm not asking you to do my homework, but exactly how I should go about this, I haven't done java in several years, and I'm still a beginner with programming. I'm thinking that the string should be an array and then the array can be read through and then change some things around as the sentence repeats right? I guess that would be best, but it'd be hard because I'm horrible at arrays and I'm completely stumped as to how to number each iteration in increasing order