/* File: int2str.c
   
   Converting an integer to a string 
   and vice versa.
*/

#include <stdio.h>
#include <ctype.h>
#include "genlib.h"
#include "simpio.h"
#include "strlib.h"

main() {
   string str1, str2 ;
   int n1, n2 ;

   printf("Input an integer: ") ;
   n1 = GetInteger() ;

   str1 = IntegerToString(n1) ;
   printf("String version of n1 is: %s\n", str1) ;

   printf("Input a string: ") ;
   str2 = GetLine() ;
   n2 = StringToInteger(str2) ;
   printf("Integer version of str2 is: %d\n", n2) ;
}
