Si tratta di un esercizio abbastanza banale preso da un libro...

codice:
#include "stdafx.h" 
#include <math.h> 
#include <stdio.h> 
#include <stdlib.h>  

void roundToInteger(double number);  

int _tmain(int argc, _TCHAR* argv[]) 
{ 	
   double x;
  	
   printf("Inserisci un numero "); 	
   scanf("%f", &x); 	 	

   roundToInteger(x);
  	
   printf("\n"); 	
   system("pause"); 	 	

   return 0; 
}  

void roundToInteger(double number) 
{	 	
   printf("%.0lf\n", floor(number)); 
}