<!-- 08. JSP Program to evaluate the result of a student. -->
<html>
<body>
<%!
//Initialize all the values in the beginning.
String stud_name="Rajesh";
String course="BCA";
String sem="V Sem";
String reg_no="BC112033";
int m1=100;
int m2=95;
int m3=96;
int m4=95;
int m5=65;
int max_marks=500;
int total_marks;
float percent;
String grade;
%>
<%
total_marks=m1+m2+m3+m4+m5;
percent = (float)(total_marks*100) / 500;
if(m1<40 || m2<40 || m3<40 || m4<40 || m5<40)
grade= "FAIL";
else
{
if(percent >=70)
grade = "DISTINCTION";
else if(percent >= 60 && percent < 70)
grade = "FIRST CLASS";
else if(percent >= 50 && percent < 60)
grade = "SECOND CLASS";
else if(percent >= 40 && percent < 50)
grade = "PASS";
}
%>
<%
out.println("<br>");
%>
<h3> Kuvempu University</h3>
<h3> MARKS SHEET</h3>
<b>Name of the Student: <%=stud_name%>
Register Number : <%=reg_no%></b>
<br>
<b>Course
: <%=course%>
Semester : <%=sem%></b>
<br>
================================================================================
<br>
SUBJECTS MAX.MARKS MIN.MARKS MARKS OBTAINED
<br>
================================================================================<br>
1. K/U/H/S
100 40 <%=m1%>
<br>
2. ENGLISH
100
40
<%=m2%>
<br>
3. JAVA PROGRAMMING
100
40
 <%=m3%><br>
4. OPERATIONS RESEARCH
100
40
 <%=m4%><br>
5. COMPUTER GRAPHICS
100
40
<%=m5%><br>
================================================================================<br>
<b>TOTAL MARKS
:
500
200
<%=total_marks%></b><br>
================================================================================<br>
<b>PERCENTAGE MARKS : <%=percent%>%</b><br>
<b>GRADE
: <%=grade%></b><br>
================================================================================<br>
</body>
</html>
<html>
<body>
<%!
//Initialize all the values in the beginning.
String stud_name="Rajesh";
String course="BCA";
String sem="V Sem";
String reg_no="BC112033";
int m1=100;
int m2=95;
int m3=96;
int m4=95;
int m5=65;
int max_marks=500;
int total_marks;
float percent;
String grade;
%>
<%
total_marks=m1+m2+m3+m4+m5;
percent = (float)(total_marks*100) / 500;
if(m1<40 || m2<40 || m3<40 || m4<40 || m5<40)
grade= "FAIL";
else
{
if(percent >=70)
grade = "DISTINCTION";
else if(percent >= 60 && percent < 70)
grade = "FIRST CLASS";
else if(percent >= 50 && percent < 60)
grade = "SECOND CLASS";
else if(percent >= 40 && percent < 50)
grade = "PASS";
}
%>
<%
out.println("<br>");
%>
<h3> Kuvempu University</h3>
<h3> MARKS SHEET</h3>
<b>Name of the Student: <%=stud_name%>
Register Number : <%=reg_no%></b>
<br>
<b>Course
: <%=course%>
Semester : <%=sem%></b>
<br>
================================================================================
<br>
SUBJECTS MAX.MARKS MIN.MARKS MARKS OBTAINED
<br>
================================================================================<br>
1. K/U/H/S
100 40 <%=m1%>
<br>
2. ENGLISH
100
40
<%=m2%>
<br>
3. JAVA PROGRAMMING
100
40
 <%=m3%><br>
4. OPERATIONS RESEARCH
100
40
 <%=m4%><br>
5. COMPUTER GRAPHICS
100
40
<%=m5%><br>
================================================================================<br>
<b>TOTAL MARKS
:
500
200
<%=total_marks%></b><br>
================================================================================<br>
<b>PERCENTAGE MARKS : <%=percent%>%</b><br>
<b>GRADE
: <%=grade%></b><br>
================================================================================<br>
</body>
</html>
No comments :
Post a Comment