Header Ads

Header ADS

URI 1012 Area Solution in C++

URI Solution 1012 👀Area👀 in C++

URI Online Judge Solution 1012Area in C++
Before seeing the solution make sure that you tried enough. Don’t paste the whole code, just find out the logic. If you stuck in trouble, just inform me on comment.
URI Online Judge Solution 1011 Sphere in C++


URI Online Judge Solution 1012 Area in C++




#include<bits/stdc++.h>

using namespace std;



int main(){

    double a,b,c;
    double pi=3.14159,tri,cri,tra,qua,ret;
    cin>>a>>b>>c;
    tri =0.5*a*c;
    cri =pi*(c*c);
    tra=(a+b)/2*c;
    qua=b*b;
    ret=a*b;
    cout<<fixed;
    cout<<setprecision(3)<<"TRIANGULO: "<<tri<<endl;
    cout<<setprecision(3)<<"CIRCULO: "<<cri<<endl;
    cout<<setprecision(3)<<"TRAPEZIO: "<<tra<<endl;
    cout<<setprecision(3)<<"QUADRADO: "<<qua<<endl;
    cout<<setprecision(3)<<"RETANGULO: "<<ret<<endl;

return 0;}

No comments

URI 1070 Six Odd Numbers Solution in C++

URI 1070 Six Odd Numbers Solution in C++ Before seeing the solution make sure that you tried enough. Don’t paste the whole code, just fin...

Powered by Blogger.