/***************************************************************************
                          iftoa.c  -  description
                             -------------------
    begin                : mar ago 27 2002
    copyright            : (C) 2002 by deabru
    email                : deabru@nubbis.com
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>

void iftoa (double int_flo,char string[])
{
/* convert positive integer float to string in base base */

    char auxS[256];
 /*   int result = 0;*/
  /*  int auxI1,auxI2;*/
    int i=0, j=0;
    double div;
/*	 int b;
    b = 10 ;
    printf("base = %d",b);*/

    div = floor(int_flo);
   do
    {
			auxS[i] = (div  -   10*floor( div / 10)) + '0';
			div = floor(div / 10);
			i++;
    }
    while (div > 0);
    auxS[i]='\0';

    for(j=0;j<i;j++)
    {
			string[j] = auxS[i-j-1];
    }
    string[j]='\0';

    return;
}