Learn2progWikkaSite : NsdPrimzahlen

HomePage :: Categories :: PageIndex :: RecentChanges :: RecentlyCommented :: Login/Register
Most recent edit on 2007-10-16 21:03:01 by KimNeunert

Additions:
Categories
CategoryNsd




Edited on 2007-10-16 21:02:08 by KimNeunert

Deletions:
Ein Struktogramm zur Primzahlenberechnung



Edited on 2007-10-16 21:01:53 by KimNeunert

Deletions:
Primzahlenberechnung




Edited on 2007-10-16 21:01:24 by KimNeunert

Deletions:




Edited on 2007-10-16 21:00:36 by KimNeunert

Additions:
Primzahlenberechnung


Deletions:
= Primzahlenberechnung =



Edited on 2007-10-16 20:59:51 by KimNeunert

Additions:
= Primzahlenberechnung = Ein Struktogramm zur Primzahlenberechnung


Deletions:
Categories
CategoryNsd




Edited on 2007-10-16 20:56:36 by KimNeunert

Additions:
Categories
CategoryNsd




Oldest known version of this page was edited on 2007-10-16 20:10:39 by KimNeunert []
Page view:
@start struktogramm main
Struktogramm could be a Function
main( )
{
@* Declarations *
int zahl ;
int i = 4 ;

@* Program *
Input: zahl
while (i < zahl)
{
if (isPrimzahl(i))
Msg:Diese Zahl ist eine Primzahl:
Output: i
i = i +1;
}
}
@end struktogramm
@start struktogramm isPrimzahl
Struktogramm could be a Function
isPrimzahl( int zahl )
{
@* Declarations *
int j ;

@* Program *
j = 2;
while (j < zahl)
{
if (zahl % j
0) return 0;
else
j = j +1;
}
return 1;
}
@end struktogramm
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by Wikka Wakka Wiki 1.1.6.3