Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {int main( )
- float x,y,z;
- cout<<"Inserire primo lato del triangolo"<<endl;
- cin>>x;
- cout<<"Inserire secondo lato del triangolo"<<endl;
- cin>>y;
- cout<<"Inserire terzo lato del triangolo"<<endl;
- if (x>=y+z || y>=x+z || z>=x+y )
- { cout<<"Non si tratta di un triangolo"<<endl;
- return 0}
- else
- { if (x==y && y==z)
- cout<<"Il triangolo è equilatero"<<endl;
- else { if (x==y && z!=y)
- cout<<"IL triangolo è isoscele"<<endl;
- else { if (x!=y && y!=z)
- cout<<"Il triangolo è scaleno"<<endl;
- }
- }
- }
- }
- return 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement