Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- #include <cmath>
- #include <algorithm>
- #include <cstdlib>
- #include <limits.h>
- #include <string>
- #define ll long long
- using namespace std;
- void Fast_IO();
- void Rofyda_Elghadban(){
- #ifndef ONLINE_JUDGE
- freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout);
- #endif
- }
- int main()
- { Rofyda_Elghadban();
- //Fast_IO();
- //freopen("input.txt","r",stdin);
- //freopen("output.txt","r",stdout);
- int l1,l2,l3;
- double num=((l1+l2+l3)/2),area;
- cin>>l1>>l2>>l3;
- area=sqrt(num*(num-l1)*(num-l2)*(num-l3));
- if((l1+l2<=l3)||(l2+l3<=l1)||(l1+l3<=l2)){
- cout<<"Invalid"<<endl;
- }else{
- cout<<"Valid"<<endl;
- cout<<area<<endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement