Q:

Calculate students marks grade using Java

0

This Program is used to calculate students marks grade using Java

All Answers

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

import java.io.*;


class ssvstud 
{ 
public static void main(String arg[]) 
{ 
int s[]=new int[9]; 
int n,z=0,x=0,y=0,w=0; 
s[0]=60;s[1]=70;s[2]=80;s[3]=72;s[4]=48;s[5]=55;s[6]=25;s[7]=90;s[8]=99; 
n=9; 
for(int i=0;i<n;i++) 
{ 
if(s[i]>=81 && s[i]<=100) 
z=z+1; 
} 
System.out.println("students in the range(81-100)is="+z); 
for(int i=0;i<n;i++) 
{ 
if(s[i]>=61 && s[i]<=80) 
y=y+1; 
} 
System.out.println("students in the range(61-80)is="+y); 
for(int i=0;i<n;i++) 
{ 
if(s[i]>=41 && s[i]<=60) 
x=x+1; 
} 
System.out.println("students in the range(41-60)is="+x); 
for(int i=0;i<n;i++) 
{ 
if(s[i]>=0 && s[i]<=40) 
w=w+1; 
} 
System.out.println("students in the range(0-40)is="+w); 
} 
}

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