shivam
BAN USER
Comments (3)
Reputation 20
Page:
1
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
0
of 0 vote
String s="pulchowk";
for(int i=0;i<s.length();i++){
if(i%2==0){
for(int j=0;j<=i;j++){
Character c=s.charAt(j);
if(j%2==0){
System.out.print(c.toString().toLowerCase());
}else{
System.out.print(c.toString().toUpperCase());
}
}
}else{
for(int j=0;j<=i;j++){
Character c=s.charAt(j);
if(j%2==0){
System.out.print(c.toString().toUpperCase());
}else{
System.out.print(c.toString().toLowerCase());
}
}
}
System.out.println();
}
Comment hidden because of low score. Click to expand.
Page:
1
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
- shivam February 23, 2015