okay so im kind of a newb to the programming world i have some self tought expierence and im now taking my first formal classes java and C++ but i can use some help with java im not asking anyone to do my home work for me i just need a bit of help. so my assignment is to "design and implement an application that reads a string from the user and prints it on char at a time"
now heres my code i figure i could use a for loop to execute a certain number of times (how many characters the string is).
The for loop can start with an marker variable of 0 and print the character at that marker's index value. So the first character. Then it adds 1 to marker. Then the for loop will repeat, but it should print the value at the 1 index. an it repeats until it's done x times, x being how many characters are in the string. i just got a little lost on the way...
package stringBreakDown;
import java.util.Scanner;
public class StringBreakDown {
public static void main(String[] args) {
String input;
float stringLength;
float exNum;
Scanner scan =new Scanner(System.in);
System.out.println("please enter your string");
input=scan.nextLine();
stringLength=input.length();
exNum=stringLength;
for (int count=0; count<=exNum {
System.out.print(input.charAt(0));
count++;
}
}