/* Copyright 2005 Daniel Cer (daniel.cer@cs.colorado.edu) This work is licensed under the Creative Commons Attribution-NonCommercial- ShareAlike License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/2.5/ or send a letter to Creative Commons, 543 Howard Street, 5th Floor, San Francisco, California, 94105, USA. */ #include #include #include int main(int argc, char *argv[]) { char *type; int count; if (argc != 3) { fprintf(stderr, "Usage:\n\t%s [real/int] (count)\n", argv[0]); return -1; } type = argv[1]; count = atoi(argv[2]); if (count <= 0) { fprintf(stderr, "Error: count should be an integer > 0\n"); return -2; } if (!strcmp(type,"int")){ int i; for (i=0; i