forked from sourabh48/Java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtcs.java
More file actions
55 lines (47 loc) · 1.15 KB
/
tcs.java
File metadata and controls
55 lines (47 loc) · 1.15 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import java.io.*;
import java.util.*;
class tcs
{
public static void main(String args[])
{
int arraysize = 3;
String[] wordarray = new String[arraysize];
Scanner scn = new Scanner(System.in);
for(int i=0;i<arraysize;i++)
{
wordarray[i] = scn.next();
}
for(int i=0;i<arraysize;i++)
{
if(i==0)
{
for(int j = 0; j< wordarray[i].length();j++)
{
if(wordarray[i].charAt(j)=='a' || wordarray[i].charAt(j)=='e' || wordarray[i].charAt(j)=='i' || wordarray[i].charAt(j)=='o' || wordarray[i].charAt(j)=='u')
{
wordarray[i] = wordarray[i].replace(wordarray[i].charAt(j),'$');
}
}
}
if(i==1)
{
for(int j = 0; j< wordarray[i].length();j++)
{
if(wordarray[i].charAt(j)=='a' || wordarray[i].charAt(j)=='e' || wordarray[i].charAt(j)=='i' || wordarray[i].charAt(j)=='o' || wordarray[i].charAt(j)=='u')
{
wordarray[i] = wordarray[i];
}
else
{
wordarray[i] = wordarray[i].replace(wordarray[i].charAt(j),'#');
}
}
}
if(i==2)
{
wordarray[i] = wordarray[i].toUpperCase();
}
}
System.out.println(wordarray[0] + wordarray[1] + wordarray[2]);
}
}