Computer Science, asked by debanjan274, 2 months ago

enter your marks weather to check you are failed or passed . passing marks are 33 %

Answers

Answered by dylandynamic4235p
0

Answer:

HERE IS YOUR ANSWER IN JAVA

import java.util.*;

public class MarksChecker

{

   public void main()

   {

       Scanner sc  = new Scanner(System.in);

       int sub1,sub2,sub3,sub4;

       System.out.println("Enter you 1st subject marks");

       sub1 = sc.nextInt();

       System.out.println("Enter you 2st subject marks");

       sub2 = sc.nextInt();

       System.out.println("Enter you 3st subject marks");

       sub3 = sc.nextInt();

       System.out.println("Enter you 4st subject marks");

       sub4 = sc.nextInt();

       int result = sub1+sub2+sub3+sub4/4;

       if (result<33)

       {

           System.out.println("You are failed");

       }

       else  

       {

           System.out.println("You are passed");

       }

   }

}

//Hope it HELPS :-)

Similar questions