(Validating input) Write a program that reads the radius of a circle and displays its
area. Your program should validate the user input. If the input is negative, display
“Incorrect input.” Here are the sample runs of this program:
المطلوب حل المسئلة بالبولبان اكسبريشن مش بالسلكشن والمشكلة انه عندنا في حالتين في حالة انه الراديوس اكبر من الزيرو واقل من الزيرو والمشكلة في الحالة التانية انه طالب رسالة محددة يعني مينفعش فولس
هادا في حالة اذا كان radius اكبر من زيرو:
Enter a radius
The area is 3.14159
اما في حالة radius اقل من زيرو البرنامج يعرض رسالة على هذا النحو:
Enter a radius: 1
Incorrect input
انا حاولت احل هذه المسئلة لكن المشكلة البرنامج لازم في سلكشن والمسئلة مكتوب فيها فقط بوليان وده للي عارفت اعمله
public class Test{
public static void main(String[] args) {
System.out.println("enter a radius");
Scanner input = new Scanner(System.in);
double radius = input.nextDouble();
double area = radius * radius * 3.14;
System.out.println("the area is " + area);
}
import java.util
}



