-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathYT35.java
More file actions
36 lines (33 loc) · 852 Bytes
/
YT35.java
File metadata and controls
36 lines (33 loc) · 852 Bytes
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
// we are in cyber world
import java.io.*;
class YT35
{
public static void main(String[] args)throws IOException
{
String str;
int L, x;
String f="";
InputStreamReader I = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(I);
System.out.println("Enter the string: ");
str=br.readLine().trim().toLowerCase();
str=" "+str;
L=str.length();
for(int i=0; i<L; i++)
{
x=str.charAt(i);
if(x==32)
{
f=f+(char)x;
i++;
x=str.charAt(i);
f=f+(char)(x-32);
}
else
{
f=f+(char)x;
}
}
System.out.println(f.trim());
}
}