// L4.cpp : Defines the entry point for the console application.
//rectangle.h
int girth(int a,int b);
int area(int a,int b);
//girth.cpp
int girth(int a,int b)
{
return 2*(a+b);
}
//area.cpp
int area(int a,int b)
{
return a*b;
}
//main.cpp
#include "stdafx.h"
#include"rectangle.h"
#include<iostream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
cin>>a>>b;
cout<<"矩形的面积是:"<<area(a,b)<<endl;
cout<<"举行的周尝试:"<<girth(a,b)<<endl;
return 0;
}
//rectangle.h
int girth(int a,int b);
int area(int a,int b);
//girth.cpp
int girth(int a,int b)
{
return 2*(a+b);
}
//area.cpp
int area(int a,int b)
{
return a*b;
}
//main.cpp
#include "stdafx.h"
#include"rectangle.h"
#include<iostream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
cin>>a>>b;
cout<<"矩形的面积是:"<<area(a,b)<<endl;
cout<<"举行的周尝试:"<<girth(a,b)<<endl;
return 0;
}