Your question is a little unclear, but if you are asking how to do this in C then here is a sample program:
Code:
#include <stdio.h>
int main (int argc, char *argv[])
{
int rnum;
int total=0;
while( total >= 0)
{
rnum=(rand(100)%10);
total+=rnum;
printf("Total = %d after adding rnum of %d\n",total,rnum);
}
return 0;
}
And I have....