/* Program to read a string and rewrite it in alphabetical order */
import java.io.DataInputStream; // to load DataInputStream class
class P27
{
public static void main(String args[ ])
{
String str=new String();
char c[] = new char[15];
char temp;
int len=0;
DataInputStream in = new DataInputStream(System.in);
try
{
System.out.print(" Enter String : ");
str = in.readLine();
}
catch(Exception e) { System.out.println("I/O Error"); }
len=str.length();
c = str.toCharArray();
for(int i=0;i<=len-1;i++)
for (int j=i+1; j<=len-1; j++)
{
if (c[i] > c[j])
{
temp = c[i];
c[i] = c[j];
c[j] = temp;
}
}
System.out.print(" Sorted String is : ");
for(int i=0;i<=len-1;i++)
System.out.print(c[i]);
}
}
import java.io.DataInputStream; // to load DataInputStream class
class P27
{
public static void main(String args[ ])
{
String str=new String();
char c[] = new char[15];
char temp;
int len=0;
DataInputStream in = new DataInputStream(System.in);
try
{
System.out.print(" Enter String : ");
str = in.readLine();
}
catch(Exception e) { System.out.println("I/O Error"); }
len=str.length();
c = str.toCharArray();
for(int i=0;i<=len-1;i++)
for (int j=i+1; j<=len-1; j++)
{
if (c[i] > c[j])
{
temp = c[i];
c[i] = c[j];
c[j] = temp;
}
}
System.out.print(" Sorted String is : ");
for(int i=0;i<=len-1;i++)
System.out.print(c[i]);
}
}
4 comments:
christian louboutin outlet
converse
lebron 17
golden goose sneakers
christian louboutin shoes
adidas zx flux
kyrie 6 shoes
louboutin shoes
jordan 6
yeezy boost
replica bags wholesale replica bags on amazon replica bags from china free shipping
replica bags lv replica gucci bags q4j41g8e08 replica bags aaa replica kipling bags visit this web-site x6o82r6g65 replica bags in london navigate to this site a5j87s5x14 replica wallets replica bags los angeles
off white outlet
stephen curry shoes
yeezy gap hoodie
pg 4
ggdb
off white hoodie outlet
goyard store
kyrie irving
hermes outlet
off white nike
Post a Comment