Thursday, 16 March 2017

Geeksforgeeks Solution For " Surface Area and Volume of Cuboid "

GeeksforGeeks Solution For School Domain .Below You Can Find The Solution Of Basic ,Easy ,Medium ,Hard .You Can Also Direct Submit Your Solution to Geeksforgeeks Same Problem .You Need to login then you can submit you answers 

Problem :- Write a program to calculate the total surface area and volume of cuboid.

Submit Your Solution :- Click Here 


Solution :- 

#include <bits/stdc++.h>
using namespace std;
int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        int a,b,c,area=0,vol=0;
        cin>>a>>b>>c;
        area=(2*((a*b)+(b*c)+(c*a)));
        vol=(a*b*c);
        cout<<area<<" "<<vol<<endl;
    }
    return 0;
}

Output:-

Geeksforgeeks Solution For " Surface Area and Volume of Cuboid "

No comments:
Write comments

Recommended Posts × +