Posts

Java sop6 Total marks

 <!DOCTYPE html> JS_sop6 <html> <head><title>javascript sop 6 </title></head> <body> <script type="text/javascript"> var marks = []; var total=0,avg,a,size = 5; // Array size for(var a = 0 a<=size; a++) { } marks[a] = prompt('Enter array Element ' + (a+1)); for(var a = 0 a<=size; a++) { total=total+parseInt(marks[a]); } alert(" Your Total marks is "+ total); avg=total/6; alert("Your Avarage is "+ avg); switch(true) { case (( vg >= 91 ) && (avg <= 100) ) : alert ("Congratulation!!!....You Got Grade A"); break; case (( g >= 81 ) && (avg <= 90) ) alert ("Congratulation!!!....You Got Grade B"); break; case (( Ng >= 71 ) && (avg <= 80) ): alert ("Congratulation!!!....You Got Grade C"); break; case ( (avg >= 61) && (avg <= 70) ) alert ("Congratulation!!!....You Got Grade D"); break; case ( (avg >= 35) ...

Java 5b ⁰F to ⁰C

 <!DOCTYPE html> <html> <head><title> Converting Temperature from Fahrenheit to Celsius</title> <script Language="Javascript"> function tempF() var F,C; { F=f1.t1.value; C=(F-32)*5/9; F=parseFloat(F); alert("entered temperature is"+F); alert("Given Temperature is "+F+"FAHERENHEIT="+C+"CELSIUS"); } </script></head> <body bgcolor="pink"> <form method="post" name="f1"> Enter temperature in terms of Faherenheit<br> <input type="text" name="t1"> <br> <input type="submit" name="s1" value="In Celsius" onClick="tempF()"> </form></body></html>

Java 5a. ⁰C to ⁰F

 <!DOCTYPE html> <html> <head><title> Converting Temperature from Celsius to Fahrenheit</title> <script Language="Javascript"> function temp() { var C,F; C=f1.t1.value; C=parseFloat(C); alert("Given Temperature is "+C+"="+F); alert("entered temperature is"+C); F=(9*C/5)+32; } </script></head> <body bgcolor="yellow"> <form method="post" name="f1"> Enter temperature in terms of Celsius <br> <input type="text" name="t1"> <br> <input type="submit" name="s1" value="In Fahrenheit" onClick="temp()"> </form></body></html>

Sop 4 javascript palindrome

 <!DOCTYPE html> <html><head><title>Reverse the stringand check palindrome</title> <script type="text/javascript"> function palindrome() { var str,str2,i,len; str2=""; str=(f1.str1.value); count=0; len=str.length; for(i=len-1;i>=0;i--) { str2=str2+str[i]; } alert("Reverse String is ==>"+str2); if(str == str2) { alert("String is palindrome"); } else { alert("String is not palindrome"); } } </script> </head> <body> <form name="f1"> Enter any string: <input type="text" name="str1"><br> <input type="button" value="Reverse String" onClick="palindrome()"> </form> </body> </html>

Sop 3 javascript. Count vowels

 <!DOCTYPE html> <html><head><title>count vowels</title> <script type="text/javascript"> function cnt() { var str, count, i, len; str=(f1.str1.value); count=0; len=str.length; for(i=0;i<=len;i++) { if((str[i] == "a")||(str[i] == "A")) { count=count+1; } else if((str[i] == "e")||(str[i] == "E")) { count=count+1; } else if((str[i] == "i" )||(str[i] == "1")) { count=count+1; } else if((str[i] == "o")||(str[i] == "O" )) { count=count+1; } else if((str[i] == "u" )||(str[i] == "U" )) { count=count+1; } } alert("Number of vowels are:=====> "+count); } </script> </head> <body> <form name="f1"> Enter any string: <input type="text" name="str1"><br> <input type="button" value="Count Vowels" onClick="cnt()"> </form> </body> ...

PHP sop4 pg-2. Total marks exam

 <!DOCTYPE html> <head><title>how to use array</title> <?php function display_marks() { $eng=$_POST["eng"]; $phy=$_POST["phy"]; $chem=$_POST["chem"]; $bio=$_POST["bio"]; $math=$_POST["math"]; $it=$_POST["it"]; $subject = array("English", "Physics", "Chemistry", "Biology", "Mathematics","IT"); $subject['English']="$eng"; $subject['Physics']="$phy"; $subject['Chemistry']="$chem"; $subject['Biology']="$bio"; $subject['Mathematics']="$math"; $subject['IT']="$it"; $i=1;$tot=0; foreach($subject as $value) { echo "$value =$subject[$value] <br>"; $tot = $tot + $subject[$value]; $i=$i+1; if($i > 6) { break; } } echo "<b> Your Total marks = $tot <br>"; echo "<b> Your percentage is = $perc %...

PHP sop4 pg-1 subject marks

 <!DOCTYPE HTML> <HTML> <HEAD> <META HTPP-EQUIV="CONTENT-TYPE" CONTENT="TEXT/HTML" CHARSET="UTF-8"> </HEAD> <BODY> <FORM ACTION="marks.php" METHOD="post" name="f1"> Enter the marks of English Subject <input type=text name="eng"><br> Enter the marks of Physics Subject <input type=text name="phy"><br> Enter the marks of Chemistry Subject <input type=text name="chem"><br> Enter the marks of Biology Subject <input type=text name="bio"><br> Enter the marks of Mathematics Subject <input type=text name="math"><br> Enter the marks of Information Technology Subject <input type=text name="it"><br> <input type="submit" value="Display marks along with subject" name="s1"> </form> </BODY></HTML>