Skip to content

Commit 3c146c6

Browse files
authored
Merge pull request #3 from alprn42/hw3
hw3
2 parents a2049dd + d3e6d8b commit 3c146c6

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

circle.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
function circleArea(r){
2+
let area = r*r*3.14;
3+
return area;
4+
}
5+
6+
function circleCircumference(r){
7+
return 2*3.14*r;
8+
}
9+
10+
module.exports = {
11+
circleArea,
12+
circleCircumference
13+
}

index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
const circle = require('./circle.js');
2+
3+
console.log(circle.circleArea(5));
4+
console.log(circle.circleCircumference(5));

0 commit comments

Comments
 (0)