biaggio90
16-11-2011, 19:03
stavo provando questo piccolo programma con DEV C++ ma mi da degli errori e non capisco il perchč dato che il programma l' ho copiato dal sito del mio professore!!fatemi sapere cosa sbaglio o se devo settare meglio DEV C++ aspetto vostre notizie.Il programma č il seguente:
# include <<iostream.h>>
using namespace std;
//-Somma di tre variabili intere a,b,c
int main ()
{
int a, b, c, somma;
cout<< "a-->";
cin>> a;
cout<< "b-->";
cin>> b;
cout<< "c-->";
cin>> c;
somma=a+b+c;
cout<< "somma=";
cout<< somma<<endl;
system ("PAUSE");
return 0;
}
gli errori sono i seguenti:
[Warning] extra tokens at end of #include directive
7 `cout' undeclared (first use this function)
(Each undeclared identifier is reported only once for each function it appears in.)
8 `cin' undeclared (first use this function)
15 `endl' undeclared (first use this function)
16 `system' undeclared (first use this function)
GRAZIE IN ANTICIPO PER IL VOSTRO AIUTO!!
# include <<iostream.h>>
using namespace std;
//-Somma di tre variabili intere a,b,c
int main ()
{
int a, b, c, somma;
cout<< "a-->";
cin>> a;
cout<< "b-->";
cin>> b;
cout<< "c-->";
cin>> c;
somma=a+b+c;
cout<< "somma=";
cout<< somma<<endl;
system ("PAUSE");
return 0;
}
gli errori sono i seguenti:
[Warning] extra tokens at end of #include directive
7 `cout' undeclared (first use this function)
(Each undeclared identifier is reported only once for each function it appears in.)
8 `cin' undeclared (first use this function)
15 `endl' undeclared (first use this function)
16 `system' undeclared (first use this function)
GRAZIE IN ANTICIPO PER IL VOSTRO AIUTO!!