[ create a new paste ] login | about

Link: http://codepad.org/Sof9C5lT    [ raw code | output | fork ]

appunti2 - C, pasted on May 2:
#include <stdio.h>
//
// Mettere qui il prototipo della funzione «interesse».
// 
// Mettere qui la descrizione della funzione «interesse».
//
// L'interesse si ottiene come capitale * tasso * tempo.
//
int main (void)
{
    double    capitale = 10000; // Euro
    double       tasso = 0.03;  // pari al 3 %
    unsigned int tempo = 3      // anni
    double   interessi;
    interessi = interesse (capitale, tasso, tempo);
    printf ("Un capitale di %f Euro ", capitale);
    printf ("investito al tasso del %f%% ", tasso * 100);
    printf ("Per %d anni, dà interessi per %f Euro.\n",
            tempo, interessi);
    getchar ();
    return 0;
}


Output:
1
2
3
4
5
In function 'main':
Line 14: error: expected ',' or ';' before 'double'
Line 15: error: 'interessi' undeclared (first use in this function)
Line 15: error: (Each undeclared identifier is reported only once
Line 15: error: for each function it appears in.)


Create a new paste based on this one


Comments: