.dsy:it.
Show 150 posts per page

.dsy:it. (http://www.dsy.it/forum/)
- Informatica applicata alla musica (http://www.dsy.it/forum/forumdisplay.php?forumid=232)
-- esercizio programmazione (http://www.dsy.it/forum/showthread.php?threadid=42400)


Posted by raffadrummer on 20-10-2011 21:07:

Unhappy esercizio programmazione

ciao premetto che sono nuovissima in questo campo ma quando eseguo il
programma mi da il warning: no new line at the end of file

il prog è questo:



//Converts a Farhenheit temperature to Celsius

#include <stdio.h>

#define FREEZING_PT 32.0f
#define SCALE_FACTOR (5.0f / 9.0f)

int main(void)
{
float farhenheit, celsius;

printf("Enter Farhenheit temperature: ");

scanf("%f", &farhenheit);

celsius = (farhenheit - FREEZING_PT) * SCALE_FACTOR;

printf("Celsius equivalent: %.1f\n", celsius);

return 0;
}


QUALCUNO MI PUO' DIRE DOVE SBAGLIOOOO


Posted by CowBoy on 20-10-2011 21:22:

"NO NEW LINE AT END OF FILE", pensavo che si spiegasse da sola questa frase... posiziona il cursore dopo la '}', batti Invio sulla tastiera, salva e ricompila.

Questo warning significa che l'EOF(end of file) del file sorgente non viene preceduto dal NEW LINE('\n'), bensì - nel tuo caso - dalla graffa chiusa.

__________________
.. ±·ø·±-`` MuSiC iS My LanGuAGe ´´-±·ø·± ..


All times are GMT. The time now is 09:09.
Show all 2 posts from this thread on one page

Powered by: vBulletin Version 2.3.1
Copyright © Jelsoft Enterprises Limited 2000 - 2002.