KT
kt
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
/*Created bt Aditya
this code is a challange code by Daniel to know about challange see the comment box
JUST ENTER AN ENGLISH SENTENCE AND LET IT EXECUTE
bugs:Known*/
import java.util.*//to import scanner
internal class ns//class <name>
{
var sc = Scanner(System.`in`)//scanner object
var s:String
var s2 = ""
var ch:Char = ' '
fun input()//to get user input
{
s = sc.nextLine()
}
fun get_new_string() {
for (i in 0 until s.length)
//Loop from starting of word till the last word of sentance
{
ch = s.get(i)//to extract each character
/*if(ch=='a'||ch=='A'||ch=='e'||ch=='E'||ch=='i'||ch=='I'||ch=='o'||ch=='O'||ch=='u'||ch=='U')
{*///starts:to convert vowels to number
if (ch == 'A' || ch == 'a')
{
s2 += 4
continue
}
else if (ch == 'e' || ch == 'E')
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run