From bfe994d35eed79eca2c895973c5740ae7a3b2f2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Nut=CC=A6iu?= Date: Thu, 21 Apr 2016 19:36:07 +0300 Subject: [PATCH] Adding some constraints --- lab9/1.c | 1 + lab9/test.svg | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lab9/1.c b/lab9/1.c index 1baf9bd..11f1539 100644 --- a/lab9/1.c +++ b/lab9/1.c @@ -31,6 +31,7 @@ void draw_disks(FILE * file, int disks, int peg, int width, int y) { */ void draw_pegs(FILE * file, int pegs, int width) { if ( !pegs ) { return; } // exit function + if ( pegs > 10) { draw_pegs(file, 10, 70); } fprintf(file, "\r\n", width); draw_pegs(file, pegs - 1, width + 100); diff --git a/lab9/test.svg b/lab9/test.svg index ef0f9aa..fa6a09f 100644 --- a/lab9/test.svg +++ b/lab9/test.svg @@ -3,7 +3,8 @@ - - - + + + + \ No newline at end of file