#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) ;
return 0 ;
}
I2luY2x1ZGUgPHN0ZGlvLmg+Ci8vCi8vIE1ldHRlcmUgcXVpIGlsIHByb3RvdGlwbyBkZWxsYSBmdW56aW9uZSDCq2ludGVyZXNzZcK7LgovLyAKLy8gTWV0dGVyZSBxdWkgbGEgZGVzY3JpemlvbmUgZGVsbGEgZnVuemlvbmUgwqtpbnRlcmVzc2XCuy4KLy8KLy8gTCdpbnRlcmVzc2Ugc2kgb3R0aWVuZSBjb21lIGNhcGl0YWxlICogdGFzc28gKiB0ZW1wby4KLy8KaW50IG1haW4gKHZvaWQpCnsKICAgIGRvdWJsZSAgICBjYXBpdGFsZSA9IDEwMDAwOyAvLyBFdXJvCiAgICBkb3VibGUgICAgICAgdGFzc28gPSAwLjAzOyAgLy8gcGFyaSBhbCAzICUKICAgIHVuc2lnbmVkIGludCB0ZW1wbyA9IDMgICAgICAvLyBhbm5pCiAgICBkb3VibGUgICBpbnRlcmVzc2k7CiAgICBpbnRlcmVzc2kgPSBpbnRlcmVzc2UgKGNhcGl0YWxlLCB0YXNzbywgdGVtcG8pOwogICAgcHJpbnRmICgiVW4gY2FwaXRhbGUgZGkgJWYgRXVybyAiLCBjYXBpdGFsZSk7CiAgICBwcmludGYgKCJpbnZlc3RpdG8gYWwgdGFzc28gZGVsICVmJSUgIiwgdGFzc28gKiAxMDApOwogICAgcHJpbnRmICgiUGVyICVkIGFubmksIGTDoCBpbnRlcmVzc2kgcGVyICVmIEV1cm8uXG4iLAogICAgICAgICAgICB0ZW1wbywgaW50ZXJlc3NpKTsKICAgIGdldGNoYXIgKCk7CiAgICByZXR1cm4gMDsKfQo=
compilation info
prog.c: In function ‘main’:
prog.c:14: error: expected ‘,’ or ‘;’ before ‘double’
prog.c:15: error: ‘interessi’ undeclared (first use in this function)
prog.c:15: error: (Each undeclared identifier is reported only once
prog.c:15: error: for each function it appears in.)
prog.c:15: warning: implicit declaration of function ‘interesse’
stdout