4/21/2023 0 Comments Kotlin range to![]() ![]() In the below examples, we have tried to print the number and alphabets in a reversed manner using the same method as we have used in examples 1 and 2, but the same concept doesn’t work as the start value must be small than the end value. There are some cases where we want to print numbers or alphabets in a reversed manner. Here we have used x variable to store the alphabets, as we want to print the alphabet from a to k, we have defined start value as a and end value ask. Here we have written a program to print the alphabets from a to k using range Here we have used x variable to store the number, as we want to print the number from 1 to 10, we have defined the start value as 1 and the end value as 10.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |