Program Cek umur [Pascal] Rahman Surya Praja Selasa, 26 April 2011 No Comment

Program untuk cek umur menggunakan bahasa pascal
Program ini di buat ketika ada tugas RPL (Rekayasa Perangkat Lunak),







Program age_calc;
uses crt;
var day1, day2, month1, month2, year1, year2, numDay : longint;
 year, month, day : integer;
 ulang : boolean; balik : char;
Begin
 clrscr;
 ulang := true;
 while ulang Do
 Begin
 clrscr;
 gotoxy (1,2);
 writeln('Program Check your age');
 writeln('created by vir0e5 a.k.a banditc0de');
 writeln('http://vir0e5.blogspot.com');
 writeln('I N D O N E S I A');
 writeln('====================================');

 writeln('input date of birth :? Day/ Month /Year');
 write('* Day :');readln(day1);
 write('* Month :');readln(month1);
 write('* Year :');readln(year1);
 writeln;

 writeln('Input todays date : Day/ Month /Year');
 write('* Day :');readln(day2);
 write('* Month :');readln(month2);
 write('* Year :');readln(year2);

 if month1 = 12 then begin;
 end
 else begin
 writeln('salah');
 end;

 numDay := (year2-year1)*360+(month2-month1)*30+(day2-day1);
 year := numDay div 360;
 month:= numDay mod 360 div 30;
 day := numDay mod 360 mod 30;
 write('your age is : ',Year,' year ',month,' Month ',day,' day');
 writeln; writeln;
 write('Do You Want To Try Again (Y/N)? : ');
 readln(balik);
 if (balik ='n') or (balik='N') then ulang := False;
 end;

End.{Created by vir0e5 a.k.a banditc0de}
Program age_calc;
uses crt;
var day1, day2, month1, month2, year1, year2, numDay : longint;
 year, month, day : integer;
 ulang : boolean; balik : char;
 Begin
 clrscr;
 ulang := true;
 while ulang Do
 Begin
 clrscr;
 gotoxy (1,2);
 writeln('Program Check your age');
 writeln('created by vir0e5 a.k.a banditc0de');
 writeln('http://vir0e5.blogspot.com');
 writeln('I N D O N E S I A');
 writeln('====================================');

 writeln('input date of birth :? Day/ Month /Year');
 write('* Day :');readln(day1);
 write('* Month :');readln(month1);
 write('* Year :');readln(year1);
 writeln;

 writeln('Input todays date : Day/ Month /Year');
 write('* Day :');readln(day2);
 write('* Month :');readln(month2);
 write('* Year :');readln(year2);

 if month1 = 12 then begin;
 end
 else begin
 writeln('salah');
 end;

 numDay := (year2-year1)*360+(month2-month1)*30+(day2-day1);
 year := numDay div 360;
 month:= numDay mod 360 div 30;
 day := numDay mod 360 mod 30;
 write('your age is : ',Year,' year ',month,' Month ',day,' day');
 writeln; writeln;
 write('Do You Want To Try Again (Y/N)? : ');
 readln(balik);
 if (balik ='n') or (balik='N') then ulang := False;
 end;
End.
by Jillur Rahman

Jillur Rahman is a Web designers. He enjoys to make blogger templates. He always try to make modern and 3D looking Templates. You can by his templates from Themeforest.

Follow him @ Twitter | Facebook | Google Plus

No Comment

Terima Kasih Sudah berkunjung!! Di Mohon Untuk Meninggalkan Komen, untuk mempererat silaturahmi.... ^_^