Hello,
I need your help one more time.
I now have this code:
Code:
/*
* =====================================================================================
*
* Filename: test2.c
*
* Description: conventer from dec to 0101
*
* Version: 1.0
* Created: 14-05-11 10:03:25
* Revision: none
* Compiler: gcc
*
* Author: Dr. Fritz Mehner (mn), [email protected]
* Company: FH Südwestfalen, Iserlohn
*
* =====================================================================================
*/
#include <stdio.h>
#include <stdlib.h>
int
main ( int argc, char *argv[] )
{
int nummer, uitkomst, teller, remainder ;
char uitkomst2[10] ;
nummer = 4 ;
uitkomst = 4 ;
while (uitkomst <0)
{
uitkomst = nummer/2;
printf ("uitkomst : %d", uitkomst);
remainder = nummer%2;
uitkomst2[teller]= remainder;
teller = teller +1 ;
nummer = uitkomst;
printf ("teller:%d nummer:%d",teller, nummer);
}
while (teller !=0)
{
printf("%d", uitkomst2[teller]);
teller = teller -1 ;
}
return EXIT_SUCCESS;
} /* ---------- end of function main ---------- */
I now get no output except a cryptic command terminated message.
Anyone see what I do wrong here ?
Roelof