java7 - DERS 7: RNEKLER rnek 1: cret Hesab...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: DERS 7: RNEKLER rnek 1: cret Hesab <HTML> <HEAD> <TITLE>JavaScript Hesaplama ve IF yaps </TITLE> <SCRIPT LANGUAGE="JavaScript"> <!--Hide the script from other browser //Faruk function calc(hours, rate) { var totalpay = 0; if(hours > 40) totalpay = (40 * rate) + (hours - 40) * rate * 1.5; else totalpay = hours * rate; return totalpay; } </SCRIPT> </HEAD> <BODY> <h2>Fazla alisma Hesabi</h2> Kullanicinin adini al. alisma saatin ve Saatlik cretini al. 40 saatin zerinde alisan 1.5 kati <hr /> <SCRIPT LANGUAGE="JavaScript"> var rate = 0; rate = prompt("saatlik cretinizi girin.","0"); var name = prompt("alisanin adini girin","Adi"); var hours = prompt("alisilan saati girin.","Saat"); var totalpay = calc(hours, rate); document.write("<CENTER><H1><B>TESEKKR</B></H1></CENTER><BR>"); document.write("alisanin ADI:" + name); document.write("<BR>alisilan Saat: " + hours); document.write("<BR>Cret: " + rate); document.write("<BR><BR>Toplam deme: " + totalpay); </SCRIPT>...
View Full Document

Page1 / 8

java7 - DERS 7: RNEKLER rnek 1: cret Hesab...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online