import java.util.*;
public class RandUPPERLOWER {
private static Scanner s;
public static void main(String[] args)
{
System.out.println("enter the Strting :");
s = new Scanner(System.in);
String str=s.nextLine();
char str1[]=new char[100];
for(int i=0;i<str.length();i++)
{
str1[i]=str.charAt(i);
}
for(int i=0;i<str.length();i++)
{
if(i%2==1)
{
System.out.print(Character.toUpperCase(str1[i])); }
else
{
System.out.print(Character.toLowerCase(str1[i])); }
}
}
}
No comments:
Post a Comment