From: hackbard Date: Sat, 6 Apr 2002 01:00:35 +0000 (+0000) Subject: improved histo.c (the if then else construct ;) X-Git-Url: https://www.hackdaworld.org/gitweb/?p=my-code%2Fbeginners.git;a=commitdiff_plain;h=95549efebdd179f2f821e2b73f5019b25108fcaf improved histo.c (the if then else construct ;) --- diff --git a/histo.c b/histo.c index 927d663..a716b82 100644 --- a/histo.c +++ b/histo.c @@ -2,7 +2,6 @@ #define HOEHE 24 #define FUNKTION y=(x-8)*(x-8)-10 #include -#include #include int x,y,i; @@ -17,7 +16,7 @@ for(i=0;i++0)?(z='+'):(z='-')); + (y==0)?(z='0'):(z=((y>0)?('+'):('-'))); printf("%02d",x); if (y>BREITE-3) {y=BREITE-3;z='*';} for(;y-->1;printf(" "));