14 lines
345 B
C
14 lines
345 B
C
#include <stdio.h>
|
|
#include "triangle.h"
|
|
#include "square.h"
|
|
#include "shape.h"
|
|
|
|
int main(){
|
|
Shape *triangle = newTriangle(20);
|
|
Shape *square = newSquare(20);
|
|
printf("Triangle area of perimeter 20: %f\n", triangle->area(triangle));
|
|
printf("Square area of perimeter 20: %f\n", square->area(square));
|
|
return 0;
|
|
}
|
|
|