Page 1 :
Tuesday, October 05, 2021, 8:08 PM, , COMBINED ICSE 246 Page 1
Page 2 :
class ascii, {, int l,i;char c;, void main(String s), {, l=s.length();, System.out.println("S.N.\tCHARACTER\tASCII VALUE");, for(i=0;i<l;i++), {, c=s.charAt(i);, System.out.println((i+1)+"\t"+c+"\t\t"+(int)c);, }, }, }, , class removespace, {, int l,i;char c;String str="";, , COMBINED ICSE 246 Page 2
Page 7 :
class strpattern, {, int i,j,l;, void main(String s), {, l=s.length();, for(i=l-1;i>=0;i--), {, for(j=0;j<=i;j++), System.out.print(s.charAt(j)+" ");, System.out.println();, }, }, }, , import java.util.*;, class strpattern, {, , public static void main(), {, Scanner sc=new Scanner(System.in);, int i,j,l;String s;, System.out.print("Enter a string");, s=sc.next();, l=s.length();, for(i=l-1;i>=0;i--), {, for(j=0;j<=i;j++), , COMBINED ICSE 246 Page 7
Page 8 :
for(j=0;j<=i;j++), System.out.print(s.charAt(j)+" ");, System.out.println();, }, }, }, , COMBINED ICSE 246 Page 8
Page 9 :
class patt, {, int i,j,l;, void main(String s), {, l=s.length();, for(i=l-1;i>=0;i--), {, for(j=0;j<=i;j++), System.out.print(s.charAt(i)+" ");, System.out.println();, }, }, }, , COMBINED ICSE 246 Page 9
Page 11 :
import java.util.*;, class wordsize, {, public static void main(), {, Scanner sc=new Scanner(System.in);, String s,wrd=""; int i,l;char c;, System.out.println("Enter a string");, s=sc.nextLine();, s=s+" ";, l=s.length();, System.out.println("Word\tNumber of characters");, for(i=0;i<l;i++), {, COMBINED ICSE 246 Page 11
Page 12 :
{, c=s.charAt(i);, if(c!=' '), wrd=wrd+c;, else, {, System.out.println(wrd+"\t"+wrd.length());, wrd="";, }, , }, }, }, , class palin, {, int l,i;char c;String rev="";, void main(String s), {, l=s.length();, for(i=0;i<l;i++), {, c=s.charAt(i);, rev=c+rev;, }, , COMBINED ICSE 246 Page 12
Page 13 :
if(rev.equals(s)), System.out.println("Palindrome words");, else, System.out.println("not Palindrome words");, }, }, , COMBINED ICSE 246 Page 13