Why am I getting garbage value here although i provided argument?

  area, c++, class, object
#include <iostream>
#include <math.h>
#include <conio.h>
using namespace std;

class Triangle
{
public:
    int a, b, c;
    void getdata();
    int peri(int a, int b, int c)
    {
        return a + b + c;
    }
    float s;
    float area;
    float Area(int a, int b, int c)
    {
        s = (a + b + c) / 2;
        area = sqrt(s * (s - a) * (s - b) * (s - c));
        cout << area;
    }

};

void Triangle::getdata()
{
    cin >> a >> b >> c;
}

int main()
{
    int x, y, z;
    cout << "Enter the three sides";
    Triangle t1;
    t1.getdata();
    cout << "The area of that triangle is " << t1.Area(x, y, z) << "and the perimeter "
         << t1.peri(x, y, z);
    return 0;
}

Actually, this code is giving me garbage value although there is no compile error. It is not giving me the desired output of area and perimeter. So why am I getting garbage value?

Source: Windows Questions C++

LEAVE A COMMENT