Machine Problem

Write a program to ask the user to give the radius of the circle,  and then our program will compute the area of the circle.

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 in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg
=================================================
Want to support my the channel?

GCash Account

Jake Pomperada
09173084360

Paypal

https://paypal.me/jakerpomperada

Patreon

https://www.patreon.com/jakerpomperada

Thank you very much for your support.
Program Listing
/* area_cicle.scala
   Prof. Jake Rodriguez Pomperada, MAED-IT, MIT
   www.jakerpomperada.blogspot.com and www.jakerpomperada.com
   jakerpomperada@gmail.com
   November 2, 2021   9:26 PM  Tuesday
   Bacolod City, Negros Occidental
 */


import java.util.Scanner;

object AreaCircle {

  def main(args: Array[String]) : Unit = {

    var input = new Scanner(System.in);

    print("\n\n");
    print("\tArea of the Circle Solver Using Scala");
    print("\n\n");
    print("\tEnter the Radius of the Circle : ");

    var radius = input.nextDouble();


    var area = 3.14 * radius * radius

    print("\n");
    print("\tThe Area of Circle is " + f"$area%2.2f" )
    print("\n\n");
    print("\t END OF PROGRAM");
    print("\n\n");
  }
}

Leave a Reply

Your email address will not be published.