#include <iostream>using namespace std; int main() { int x1,x2,y1,y2; float distanza; char *; cout<<"inserire x1,x2,y1,y2"<<endl; cin>>x1>>x2>>y1>>y2; cout<<"Inserire * se si vuole stoppare il calcolo della distanza"<<endl; while(x1!=0){ distanza=sqrt((x2-12)^2+(y2-y1)^2)) cout<<"las distanza é"<<distanza<<endl; } return 0;}
Standard input is empty
prog.cpp: In function ‘int main()’: prog.cpp:7:8: error: expected unqualified-id before ‘;’ token char *; ^ prog.cpp:12:36: error: ‘sqrt’ was not declared in this scope distanza=sqrt((x2-12)^2+(y2-y1)^2)) ^
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!