-
Notifications
You must be signed in to change notification settings - Fork 0
/
YT28.java
36 lines (33 loc) · 879 Bytes
/
YT28.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import java.io.*;
class YT28
{
public static void main(String[] args)throws IOException
{
String str;
char ch;
String vo="", co="", f="";
int v=0, c=0;
InputStreamReader I = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(I);
System.out.println("Enter the string: ");
str=br.readLine().trim().toUpperCase();
for(int i=0; i<str.length(); i++)
{
ch=str.charAt(i);
if(ch=='A'||ch=='E'||ch=='I'||ch=='O'||ch=='U')
{
vo=vo+ch;
v++;
}
else
{
co=co+ch;
c++;
}
}
f=vo+co;
System.out.println(f);
System.out.println(v);
System.out.println(c);
}
}