X-Git-Url: https://pd.if.org/git/?p=pd_readline;a=blobdiff_plain;f=range.c;fp=range.c;h=0000000000000000000000000000000000000000;hp=c4c6cfe80eed669335040ec18d1d03986fc97f23;hb=050f646dd55e7fef8b2d0dcf5d1740ea8484f9c1;hpb=d56fdb0ce92c92e27ef45a8315ff26c272a1f23d diff --git a/range.c b/range.c deleted file mode 100644 index c4c6cfe..0000000 --- a/range.c +++ /dev/null @@ -1,61 +0,0 @@ - - -/* range.c */ - -/* See if an int is in a given range. */ - - - -#include -#include -#include - - - -/* Find if a number is in a given range. */ -int range(int rstart, int rend, int i) -{ - if ( (rstart <= i) && (i <= rend) ) return 1; - else return 0; - -} - - - -int main() -{ - -/* Within the range. */ -int a = range(0, 9, 5); -int b = range(0, 9, 0); -int c = range(0, 9, 9); -int d = range(20, 40, 32); - - -/* Outside the range. */ -int e = range(0, 9, -15); -int f = range(20, 40, 75); -int g = range(50, 80, 91); - -printf("%d %d %d %d %d %d %d \n", a, b, c, d, e, f, g); - - -int i = 65; -char s[2]; - -snprintf(s, 2, "%c", i); - -printf("%s \n" , s ); - -return 0; - - -} - - - - - - - -