Computer Science, asked by samar1147, 1 year ago

write a program in java to accept a word . arrange all the alphabet of the word in ascending order and display the new word

Answers

Answered by max20
1
Q="";
Convert accepted word s to uppercase.
run loop i from 65 to 90
ch= (char)i.
run loop j from 0 to s.length( ) -1
if (s.charAt(j)== ch)
{Q= Q+ch;
}
j=j+1;
i=i+1;
print Q

max20: this is just the algorithm
Similar questions