A simple program to ask the user to give two numbers and then the program will compute the sum of two numbers using Scala programming language.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website, kindly contact me also at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.

Program Listing


import java.util.Scanner;

object Addition {
 def main(args: Array[String]):Unit={
  var scanner = new Scanner(System.in);
  print("Addition of Two Numbers in Scala");
  print("Enter the first number : ");
  var a = scanner.nextInt();
  print("Enter the second number : ");
  var b = scanner.nextInt();

  var sum = a+b;

  println(s"$a + $b = $sum");
  println("END OF PROGRAM");