Code to print A to Z letters in Kotlin?

All QuestionsCategory: KotlinCode to print A to Z letters in Kotlin?
chetan shidling asked 4 years ago

I need code.

1 Answers
chetan shidling answered 4 years ago

Here is the code to print A to Z letters in Kotlin.
 
fun main(args : Array<String>){
var nums = ‘A’..’Z’

for(a in nums)
{
println(a)
}

println(“Couts is ” +nums.count())
}
 
Output:
 
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
Couts is 26