Computer Science, asked by JaksonBiswas, 1 year ago

Write a Java program to assign a string and print it in the following way( I WARN YOU THAT SPAMS WILL BE REPORTED)

COMPUTER
COMPUTE
COMPUT
COMPU
COMP
COM
CO
C

Please answer it....

Answers

Answered by aayushi75
0
class xyz
{
void main()
{
Sting a=COMPUTER;
String b=COMPUTE;
String c=COMPUT;
String d=COMPU;
String e=COMP;
String f=COM;
String g=CO;
String h=C;
System.out.println(a);
System.out.println(b);
System.out.println(c);
System.out.println(d);
System.out.println(e);
System.out.println(f);
System.out.println(g);
System.out.println(h);
}
}

AneekBiswas1: Lame answer
AneekBiswas1: And its totally incorrect
AneekBiswas1: You need to do this one universally
Similar questions