java7 - DERS 7 ÖRNEKLER Örnek 1 Ücret...

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 Document Right Arrow Icon

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

View Full Document Right 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 yapısı </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>TESEKKÜR</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

  • Winter '12
  • daviddavenport
  • Sans-serif, Helvetica, Village development committee, option value=, script language=, Sayiyi Tahmin Edin

{[ snackBarMessage ]}

Page1 / 8

java7 - DERS 7 ÖRNEKLER Örnek 1 Ücret...

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