Professional Documents
Culture Documents
*;
import java.lang.String;
import java.lang.Math;
Exam()throws IOException
int ch;
do{
ch=Integer.parseInt(br.readLine());
switch(ch)
case 1: read();
break;
case 2: read1();
break;
case 3: toggle();
break;
case 4: cubs();
break;
case 5: Vowel();
break;
case 6: break;
default:System.out.println("Invalid choice");
} }while(ch!=6);
System.out.println("Name:- ");
str=br.readLine();
System.out.println(str);
System.out.println("Number");
num=Integer.parseInt(br.readLine());
System.out.println("num");
char a;
String togg="";
if(Character.isUpperCase(str.charAt(i)))
a=Character.toLowerCase(str.charAt(i));
togg=togg+a;
else if(Character.isLowerCase(str.charAt(i)))
{
a=Character.toUpperCase(str.charAt(i));
togg=togg+a;
System.out.println(togg);
int rem,sq,temp=num,sum=0;
do
rem=temp%10;
sq=(int)Math.pow(rem,3);
sum=sum+sq;
temp=temp/10;
}while(temp!=0);
System.out.println(sum);
int count=0;
if(str.charAt(i)=='a')
count++;
else if (str.charAt(i)=='e')
count++;
}
else if (str.charAt(i)=='i')
count++;
else if (str.charAt(i)=='o')
count++;
else if (str.charAt(i)=='u')
count++;
else if (str.charAt(i)=='A')
count++;
else if (str.charAt(i)=='E')
count++;
else if (str.charAt(i)=='I')
count++;
else if (str.charAt(i)=='O')
count++;
else if (str.charAt(i)=='U')
count++;
}
System.out.println(count);