old-cross-binutils/gdb/testsuite/gdb.hp/sum.c
1999-01-04 15:37:21 +00:00

15 lines
310 B
C

/* This is a sample program for the HP/DDE debugger. */
#include <stdio.h>
#ifdef __STDC__
int sum(int list[], int low, int high)
#else
int sum(list, low, high)
int list[], low, high;
#endif
{
int i, s = 0;
for (i = low; i <= high; i++)
s += list[i];
return(s);
}