/* * funcint3B.c */ #include #include "mymath.h" ///////////////////////////////////////// // get an answer int get_answer(void) { char cc; printf("\nPress 'q' to quit, any other key to continue!: "); cc=getchar(); if(cc=='q') { return 0; } else { return 1; } } ///////////////////////////////////////// // average of two integers float int_average(int xx, int yy) { return(xx+yy)/2.0; } ///////////////////////////////////////// // divide int xx by int yy float int_division(int xx, int yy) { return ( (float)xx/yy ); } ///////////////////////////////////////// // multiply two integers int int_product(int xx, int yy) { return(xx*yy); } ///////////////////////////////////////// // int xx raised to the power of yy int int_power(int xx, int yy) { int ii; int pp=1; for(ii=0; ii=yy) { xx=xx-yy; } return xx; } } /////////////////////////////////////////