Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Need some functions help "C++"

Name: Anonymous 2007-03-10 6:56 ID:97+75dZh

I just wan't to know why dosn't my program gives me zero for my perimeter and area

#include<iostream> // for cout and cin
#include<cmath>

using namespace std;

int a,b,c,s,area;


void calc()
   {
    s=a+b+c;
    area=sqrt(s*(s-a)*(s-b)*(s-c));
    }

int main()
{    

     
      cout<<"Please enter the first side\n";
      cin>>a;
      cout<<"\nPlease enter the second side\n";
      cin>>b;
      cout<<"\nPlease enter the third side\n";
      cin>>c;
      //end part 1

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List