Cppreference:Archives
From cppreference.com
Revision as of 03:58, 16 January 2020 by 213.233.108.202 (Talk)
- include <iostream>
- include <math.h>
using namespace std;
int main() { float l1, l2, l3, p, P, A; cout<<"l1="; cin>>l1; cout<<"l2="; cin>>l2; cout<<"l3="; cin>>l3;
P=l1+l2+l3; cout<<"Perimetrul triunghiului oarecare este: "<<P; p=(l1+l2+l3)/2; cout<<"\n"<<"Semiperimetrul triunghiului oarecare este: "<<p; A=sqrt((p)*(p-l1)*(p-l2)*(p-l3)); cout<<"\n"<<"Aria triunghiului oarecare este: "<<A; }