Oldest known version of this page was edited on 2007-10-24 23:27:36 by KimNeunert []
Page view:
@start struktogramm mondgesicht
Struktogramm could be a Function
mondgesicht( int xpos, int ypos, double r )
{
@* Declarations *
No Declarations
@* Program *
drawOval(xpos,ypos,(int)(r*90.0),(int)(r*90.0));
drawArc(xpos+25,ypos+50,(int)(r*45.0),(int)(r*20.0),0,-180);
drawLine(xpos+45,ypos+35,(int)(r*95.0),(int)(r*55.0));
drawRect(xpos+25,ypos+20,(int)(r*10.0),(int)(r*10.0));
fillRect(xpos+27,ypos+22,(int)(r*5.0),(int)(r*5.0));
drawRect(xpos+55,ypos+20,(int)(r*10.0),(int)(r*10.0));
fillRect(xpos+57,ypos+22,(int)(r*5.0),(int)(r*5.0));
return;
}
@end struktogramm
@start struktogramm main
Struktogramm could be a Function
main( )
{
@* Declarations *
int y ;
int x ;
int frage ;
@* Program *
;
do {
x = (int)(random()*100.0);
y = (int)(random()*100.0);
mondgesicht(x,y,1.0);
Msg:Noch ein Mondgesicht ? (1 ja/0 nein)
Input: frage
} while(frage 1);
}
@end struktogramm
Categories