Program to Calculate Total mark & percentage of a Student :-
public class student{
public static void main ()
{
int math,phy,chem,bio,hindi,eng,odia,geo,his,comp,sum,per;
math=85;
phy=98;
chem=87;
bio=97;
hindi=87;
eng=76;
odia=71;
geo=94;
his=87;
comp=99;
sum=math+phy+chem+bio+hindi+eng+odia+geo+his+comp;
per=sum/10;
System.out.println("total mark="+sum);
System.out.println("percentage="+per+"%");
}
}
No comments:
Post a Comment