ADVERTISEMENT
ADVERTISEMENT

Scala Basic Programs

This section contains the basic programs of Scala like printing text, reading values, programs based on the basic operators, conditional-bases programs, etc.

Practice these Scala basic programs to learn the basic programming concepts of Scala, these programs contain the solved code, outputs, and the detailed explanation of the statements, functions used in the Scala basic programs.

List of Scala Basic Programs

  1. Scala program to print 'Hello World'
  2. Scala program to create the mutable variable
  3. Scala program to create an immutable variable
  4. Scala program to create different types of variables
  5. Scala program to print the value of variables using printf() function
  6. Scala program to print the value of the Boolean variable using printf() function
  7. Scala program to print the hexadecimal value of a number
  8. Scala program to print the octal value of a number
  9. Scala program to read and print the value of the string
  10. Scala program to read the value of integer variable
  11. Scala program to read the value of float variable
  12. Scala program to read the value of character variable
  13. Scala program to find the largest number between two numbers using ternary operator
  14. Scala program to find the largest number among three numbers using ternary operator
  15. Scala program to check whether a given number is EVEN or ODD using ternary operator
  16. Scala program to print the ASCII value of the corresponding character
  17. Scala program to print the type of the variable
  18. Scala program to swap two numbers
  19. Scala program to calculate the area of the circle
  20. Scala program to calculate the perimeter of the circle
  21. Scala program to calculate the area of the rectangle
  22. Scala program to find the square root of a number
  23. Scala program to calculate the power of a number
  24. Scala program to multiply two numbers using the plus (+) operator
  25. Scala program to calculate the Highest Common Factor (HCF)
  26. Scala program to demonstrate the bitwise left-shift (<<) operator
  27. Scala program to demonstrate the bitwise right-shift (>>) operator
  28. Scala program to demonstrate the Bitwise AND (&) Operator
  29. Scala program to demonstrate the Bitwise OR (|) Operator
  30. Scala program to demonstrate the Bitwise XOR (^) Operator
  31. Scala program to demonstrate the 1's complement (~) Operator
  32. Scala program to find factorial of a number
ADVERTISEMENT



ADVERTISEMENT



Comments and Discussions


ADVERTISEMENT

ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT

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.