Kotlin basic programs

This section contains solved basic programs in Kotlin programming language with explanations, outputs.

List of the basic programs in Kotlin

  1. Kotlin program to perform arithmetic operations on two numbers
  2. Kotlin program to perform simple calculation on two integer numbers
  3. Kotlin program to input numbers (integer, float, double) at run time
  4. Kotlin program to input a string
  5. Kotlin program to find largest of three numbers
  6. Kotlin program to swap two numbers
  7. Kotlin program to convert distance Miles to KM and KM to Miles
  8. Kotlin program to check whether a number is EVEN or ODD
  9. Kotlin program to check whether given number is positive, negative or zero
  10. Kotlin program to check leap year
  11. Kotlin program to print the multiplication table of given number
  12. Kotlin program to calculate simple interest
  13. Kotlin program to calculate compound interest
  14. Kotlin program to calculate and display student grades
  15. Kotlin program to find GCD/HCF of two numbers
  16. Kotlin program to convert temperature from Fahrenheit to Celsius
  17. Kotlin program to find LCM of two numbers
  18. Kotlin program to find factors of a number
  19. Kotlin program to check if given number is perfect square
  20. Kotlin program to find factorial of a number
  21. Kotlin program to display Fibonacci series
  22. Kotlin program to count digits in an integer number
  23. Kotlin program to find sum of digits of a number
  24. Kotlin program to find area of circle
  25. Kotlin program to find area of Rectangle
  26. Kotlin program to find area of Square
  27. Kotlin program to find area of Triangle
  28. Kotlin program to find area of a cube
  29. Kotlin program to find surface area of a cuboid
  30. Kotlin program to find area of a cylinder
  31. Kotlin program to find area of Equilateral Triangle
  32. Kotlin program to find area of Parallelogram
  33. Kotlin program to find area of Pentagon
  34. Kotlin program to find surface area of Sphere
  35. Kotlin program to find volume of Sphere
  36. Kotlin program to reverse a number
  37. Kotlin program to print all prime factors of given number
  38. Kotlin program to check Armstrong number
  39. Kotlin program to display Armstrong numbers between a range
  40. Kotlin program to check given number is palindrome number or not
  41. Kotlin program to print all palindromes in a given range
  42. Kotlin program to check whether a number is prime or not
  43. Kotlin program to find prime numbers in a given range
  44. Kotlin program to check whether number is binary or not
  45. Kotlin program to convert decimal to binary
  46. Kotlin program to convert decimal number to octal number
  47. Kotlin program to convert binary number to octal number
  48. Kotlin program to convert binary number to decimal number
  49. Kotlin program to convert octal number to binary number
  50. Kotlin program to convert octal number to decimal number
  51. Kotlin program to calculate the sum of natural numbers
  52. Kotlin program to generate 4 digits OTP
  53. Kotlin program to print Kotlin, JVM version (printing Java properties)

Recursion

  1. Kotlin program to calculate the power of a number using recursion
  2. Kotlin program to find sum of natural numbers from 1 to N using recursion
  3. Kotlin program to find factorial of a given number using recursion
  4. Kotlin program to find GCD/HCF of two numbers using recursion
  5. Kotlin program for Decimal to Binary conversion using recursion






Comments and Discussions

Ad: Are you a blogger? Join our Blogging forum.





Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates


© https://www.includehelp.com some rights reserved.