Program of admission test result in java

Monday, March 16, 2009

import java.io.*; class addmission { public static void main(String args[])throws IOException { System.out.print("Enter your student number:"); BufferedReader ob=new BufferedReader(new InputStreamReader(System.in)); int n=Integer.parseInt(ob.readLine()); int student[][]=new int[n+1][3+1]; for(int d=1;d<=n;d++) { System.out.printf("For the student[%d]:",d); System.out.println(); for(int c=1;c<=3;c++) { if(c==1) { System.out.print("Number of mathmatics:"); student[d][c]=Integer.parseInt(ob.readLine()); } if(c==2) { System.out.print("Number of physics:"); student[d][c]=Integer.parseInt(ob.readLine()); } if(c==3) { System.out.print("Number of chemistry:"); student[d][c]=Integer.parseInt(ob.readLine()); } } System.out.println(); } int count=0; for(int i=1;i<=n;i++) { for(int j=1;j<=1;j++) { if((student[i][j]>=60 && student[i][j+1]>=50 && student[i][j+2]>=40 && (student[i][j]+ student[i][j+1]+ student[i][j+2]>=200))||(student[i][j]+ student[i][j+1])>=150) { count=count+1; System.out.printf("Your elegible candidate rollno is %d ",i); System.out.println(); } } } System.out.println("Your number of eligble candidate="+count); } }

0 comments:

Visitors

PlugIn.ws - Free Hit Counter, Web Site Statistics, Traffic Analysis

  © Blogger template Leaving by Ourblogtemplates.com 2008

Back to TOP