Hi.. Hi.. my friends.. you are on my blog at “We Are
aKnowledge”… You can take many IT knowledge in here. I provided for you is IT
knowledge from dekstop programming until web programming.
You must read my article for know how to method making
library program using for in program language pascal. So let’s do read my
article.. have fun friends to read ….
Pascal is program language based dekstop… you must to learn
this program language, before you to learn other program language..
This is coding for making sample library program using for…
you can copy this coding to your aplication or you also can copy to your
notepad.
Example 1 :
uses crt;
var
a, b, c : integer;
d, e, f : string;
begin
clrscr;
writeln ('
Welcome In Library Program');
writeln ('This Is Sample Program Made By We Are Knowledge');
writeln (' Sample
Library Program Using For');
writeln;
writeln;
write ('Input Your Name
: ');
readln (d);
write ('Input Title Of Book : ');
readln (e);
write ('Old Lending Of Book : ');
readln (b);
c := 0;
for a := 1 to b do
c := c + 1500;
writeln;
writeln;
writeln ('Your Old Lending Of Book Is : ', b, ' Day');
writeln ('=======================================');
writeln ('So.. You must Pay Lending Is : Rp. ', c);
readln;
end.
Attention : ::
Please change all quotes (“ “) or (‘ ‘), if you using copy
paste..
And if you paste in notepad, you must change save as type become
“.pas”. example library.pas.
Logic ::
Uses crt
>> the syntax is optional, you must using this if you will
giving syntax “clrscr” in your coding.
Var
>> place for definition variable, a, b, c.
Variable
integer >> for to result number value
Variable
string >> for to result character value.
Begin
>> this syntax for starting the program
Clrscr
>> for cleaning output window
Writeln
>> for printing value (character or string) to output
window
Readln
>> this syntax for inputting value (character or
string) in output window
End
>> the syntax for finishing thh program
Ok.. just it..
I hope you l understand..
See you later friends…
No comments:
Post a Comment