C
co
com
comp
compu
comput
compute
computer
How To print the program using Java
Answers
Answered by
1
Explanation:
public class Pattern
{
public static void main(String[] args)
{
String str = "computer";
for(int i=1;i<=str.length();i++)
{
System.out.println(str.substring(0,i));
}
}
}
please mark my answer as brainliest......
Similar questions