projects
/
my-code
/
beginners.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
moved test/* to beginners/ directory
[my-code/beginners.git]
/
histo.c
diff --git
a/histo.c
b/histo.c
index
927d663
..
a716b82
100644
(file)
--- a/
histo.c
+++ b/
histo.c
@@
-2,7
+2,6
@@
#define HOEHE 24
#define FUNKTION y=(x-8)*(x-8)-10
#include <stdio.h>
#define HOEHE 24
#define FUNKTION y=(x-8)*(x-8)-10
#include <stdio.h>
-#include <stdlib.h>
#include <math.h>
int x,y,i;
#include <math.h>
int x,y,i;
@@
-17,7
+16,7
@@
for(i=0;i++<BREITE-1;printf("-"));
for(x=0;x<=HOEHE-4;x++)
{
FUNKTION;
for(x=0;x<=HOEHE-4;x++)
{
FUNKTION;
- (y==0)?(z='0'):(
(y>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(" "));
printf("%02d",x);
if (y>BREITE-3) {y=BREITE-3;z='*';}
for(;y-->1;printf(" "));