home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d9xx
/
d958
/
fed-case.lha
/
Fed-CASE
/
sources
/
hanoi.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-12-04
|
5KB
|
92 lines
/************************************************************************/
/* */
/* Code generated by FED-CASE V1.0 Code Generator */
/* © Joosen Software Development */
/* All rights reserved 1993 */
/* */
/************************************************************************/
/************************************************************************/
/* */
/* Start of Includes */
/* */
/************************************************************************/
#include <exec/types.h>
#include <data/const_hanoi.h>
#include <stdio.h>
/************************************************************************/
/* */
/* End of Includes */
/* */
/************************************************************************/
/************************************************************************/
/* */
/* Start of source prototype file */
/* */
/************************************************************************/
#include <proto/proto_hanoi.h>
/************************************************************************/
/* */
/* End of source prototype file */
/* */
/************************************************************************/
/************************************************************************/
/* Procedure : void V_Hanoi(FLI_num,FLI_from,FLI_to,FLI_help) */
/* Function : */
/* Designer : Ron Heijmans */
/* Date : Sat Nov 27 13:44:27 1993 */
/* */
/* Modificat : */
/* Handler : */
/* Modific. : */
/* */
/************************************************************************/
void V_Hanoi(FLI_num,FLI_from,FLI_to,FLI_help)
long int FLI_num;
long int FLI_from;
long int FLI_to;
long int FLI_help;
{
if (FLI_num== 1 )
{
printf( "move %d from %d to %n" , 1 , FLI_from , &FLI_to ) ; /* printf: Standard output function */
}
else /* if(FLI_num == 1) */
{
V_Hanoi( FLI_num - (long int) 1 , FLI_from , FLI_help , FLI_to ) ;
printf( "move %d from %d to %d\n" , FLI_num , FLI_from , FLI_to ) ; /* printf: Standard output function */
V_Hanoi( FLI_num - (long int) 1 , FLI_help , FLI_from , FLI_to ) ;
} /* end of else 'if(FLI_num == 1)' */
} /* end of V_Hanoi */
/************************************************************************/
/* Procedure : void main() */
/* Function : */
/* Designer : Ron Heijmans */
/* Date : Sat Nov 27 13:44:30 1993 */
/* */
/* Modificat : */
/* Handler : */
/* Modific. : */
/* */
/************************************************************************/
void main()
{
int LI_slice;
LI_slice= 0 ;
printf( "How many slices ? " ) ; /* printf: Standard output function */
scanf( "%d" , LI_slice ) ;
V_Hanoi((long int) LI_slice , (long int) 1 , (long int) 3 , (long int) 2 ) ;
} /* end of V_main */