A Collection of Code Snippets in as Many Programming Languages as Possible
This project is maintained by TheRenegadeCoder
Welcome to the Even Odd in Pascal page! Here, you'll find the source code for this program as well as a description of how the program works.
program a1(input, output, stdErr);
(* Read Number from commandline, print Even or Odd *)
var
buf: String;
a, check:integer;
begin
buf:= paramStr(1);
Val(buf, a, check) ;
if check <> 0
then
writeln('Usage: please input a number')
else
begin
if( (a mod 2) = 0) then
begin
writeln('Even');
end
else
begin
writeln('Odd');
end
end
end.
Even Odd in Pascal was written by:
If you see anything you'd like to change or update, please consider contributing.
No 'How to Implement the Solution' section available. Please consider contributing.
No 'How to Run the Solution' section available. Please consider contributing.