Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

Report Card Generator 3 Rhea 2T 17

<!DOCTYPE html>
<html>
<title>Web Page Design</title>
<head>
<script>

var name = prompt('Enter your name.');
var urclass = prompt('What is your class?');
var index = prompt('What is your index number?');

var eng = prompt('What are your english marks? (out of 100)?');
var math = prompt('What are your math marks? (out of 100)?');
var ursci = prompt('What are your science marks? (out of 100)?');
var urmt = prompt('What are your mothertongue marks? (out of 100)?');

var enggrade = '';
var mathgrade = '';
var urscigrade = '';
var urmtgrade = '';

if (eng >= 70){
    enggrade = ' (A)';
}

else if (eng >= 50){
    enggrade = ' (B)'
}

else{
    enggrade = ' (C)'
}

if (math >= 70){
    mathgrade = ' (A)';
}

else if (math >= 50){
    mathgrade = ' (B)'
}

else{
    mathgrade = ' (C)'
}

if (ursci >= 70){
    urscigrade = ' (A)';
}

else if (ursci >= 50){
    urscigrade = ' (B)'
}

else{
    urscigrade = ' (C)'
}

if (urmt >= 70){
    urmtgrade = ' (A)';
}

else if (urmt >= 50){
    urmtgrade = ' (B)'
}

else{
    urmtgrade = ' (C)'
}

document.write('===report card==='+'<br>');
document.write('Name:'+ ' '+ name + '<br>');
document.write('Class:'+ ' '+ urclass +'<br>');
document.write('Index No.:'+ ' ' + index + '<br>');

document.write('===grades==='+'<br>');
document.write('english:'+ ' '+ eng + '/100'+ enggrade + '<br>');
document.write('math:'+ ' '+ math + '/100'+ mathgrade +'<br>');
document.write('science:'+ ' '+ ursci + '/100'+ urscigrade + '<br>');
document.write('mothertongue:'+ ' '+ urmt + '/100'+ urmtgrade + '<br>');

document.write('===total score==='+'<br>')
var total = Number(eng) + Number(math) + Number(ursci) + Number(urmt)
document.write('your total score (out of 400) is:' + ' ' + total)



</script>
</head>
<body>
</body>
</html>

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.