fork download
  1. import java.util.Scanner;
  2. public class PunaMekanike{
  3.  
  4. public static void main(String []args){
  5. Scanner scan = new Scanner(System.in);
  6.  
  7. System.out.println("Shkruaje vleren per forcen F: ");
  8. double F = scan.nextDouble();
  9.  
  10. System.out.println("Shkruaje vleren per rrugen s: ");
  11. double s = scan.nextDouble();
  12.  
  13. double A;
  14.  
  15. System.out.println("Puna mekanike A e cila kryhet me forcen F pergjate rruges S: " + (A = F * s));
  16.  
  17. }
  18. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:2: error: class PunaMekanike is public, should be declared in a file named PunaMekanike.java
public class PunaMekanike{
       ^
1 error
stdout
Standard output is empty