Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
17
Task/Integer-comparison/Pike/integer-comparison.pike
Normal file
17
Task/Integer-comparison/Pike/integer-comparison.pike
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
int main(int argc, array(int) argv){
|
||||
if(argc != 3){
|
||||
write("usage: `pike compare-two-ints.pike <x> <y>` where x and y are integers.\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int a = argv[1];
|
||||
int b = argv[2];
|
||||
|
||||
if(a > b) {
|
||||
write(a + " is greater than " + b + "\n");
|
||||
} else if (a < b) {
|
||||
write(a + " is less than " + b + "\n");
|
||||
} else {
|
||||
write(a + " is equal to " + b + "\n");
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue