Post date: Feb 5, 2014 7:03:45 PM
//Write a java program that reads 7 student grades then print the number of pass and fail students ?
import java.util.Scanner;//Needed for class Scanner
public class Pass_Fail
public static void main(String args)
System.out.println("Enter input degree (between 0-100) of 7 students :");
//Create a class Scanner for inputting data.
Scanner input=new Scanner(System.in);
int pass=0; //number of pass students.
int n; //For storing the entered value.
System.out.println( "Number of Passed students :"+pass);
System.out.println( "Number of failed students :"+(7-pass));