#include #include #include "project.h" /************************************************************************ * Reads in a binary sequence and outputs positions of points * * Length between each point is determined by the sequence * * David Longbottom * ************************************************************************/ int main (int argc, char *argv[]) { char c; float x, y; y = 50.0; x = 0.0; GET_ARG(y,1) PRINT_POINT(x,y) while ( TRUE ) { if ((c = getchar() ) == '\n' ) break; // \n is end of line x += (c == A) ? LENGTH_A : LENGTH_B; //increment x depending on intruction PRINT_POINT(x,y) } return(EXIT_SUCCESS); }