Q:

Calculate Simple Mark Sheet Using Java

0

This Program is used to calculate simple Mark Sheet using Java

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

// mark calculation 

import java.io.*; 
class ssvadmit 
{ 
public static void main(String args[]) throws IOException 
{ 
int c1=0,c2=0,c3=0,c4=0; 
int mark[] = new int[4]; 
BufferedReader ip = new BufferedReader(new InputStreamReader(System.in)); 
System.out.print("Total Number of Student Marks:"); 
int tot = Integer.parseInt(ip.readLine()); 
for(int i=1;i<=tot;i++) 
{ 
System.out.println(); 
System.out.println("Enter in order of MATHS(mark1),PHYSICS(mark2) & CHEMISTRY(mark3)"); 
System.out.print("Enter marks of student " + i + " below:"); 
for(int j=1;j<=3;j++) 
{ 
System.out.println(); 
System.out.print("\tMark " + j + " : "); 
int mark1 = Integer.parseInt(ip.readLine()); 
if (mark1 > 100) { j=j--;continue;} 
mark[j] = mark1; 
} 
int cutof1 = mark[1] + mark[2] ; 
int cutof2 = mark[1] + mark[2] + mark[3]; 
if(cutof1 >=150 && cutof2 >= 200 && mark[1] >= 60 && mark[2] >= 50 && mark[3] >= 40 ) 
System.out.println("YOU ARE ELIGIBLE CANDIDATES"); 
else 
System.out.println("YOU ARE NOT ELIGIBLE CANDIDATES"); 
} 
} 
}

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now