fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4.  
  5.  
  6. /* Name of the class has to be "Main" only if the class is public. */
  7. class Ideone
  8. {
  9. public static void main (String[] args)
  10. {
  11. Scanner sc=new Scanner(System.in);
  12. double q,w,e,r,t,y,u;
  13. System.out.println("Enter the total marks");
  14. u=sc.nextDouble();
  15. System.out.println("enter the marks of 6 subject");
  16. q=sc.nextDouble();
  17. w=sc.nextDouble();
  18. e=sc.nextDouble();
  19. r=sc.nextDouble();
  20. t=sc.nextDouble();
  21. y=sc.nextDouble();
  22. y=q+w+e+r+t+y*100/u;
  23. }
  24.  
  25.  
  26.  
  27. }
  28.  
  29.  
Success #stdin #stdout 0.21s 57996KB
stdin
600
99
98
99
97
99
90
stdout
Enter the total marks
enter the marks of 6 subject