home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
makedce.zip
/
EXAMPLES.ZIP
/
examples
/
Binop
/
binop.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-05-08
|
626b
|
24 lines
#include <stdio.h>
main(int argc, char *argv[], char *envp[])
{
char *msg = "Binop Application Completed";
int i, n, pass, failures=0, PASSES=10, CALLS=10;
for (pass = 1; pass <= PASSES; pass++) {
printf("PASS (%d):", pass);
for (i = 1; i <= CALLS; i++) {
binop_add(i, i, &n);
if (n != i+i) {
printf("Two times %ld is NOT %ld\n", i, n);
failures++;
}
printf(".");
}
printf("\n");
}
printf("%s: %d calls, %d failures\n",
msg, PASSES*CALLS, failures);
}