diff options
author | Ibrahim Mkusa <ibrahimmkusa@gmail.com> | 2023-04-25 22:52:40 -0400 |
---|---|---|
committer | Ibrahim Mkusa <ibrahimmkusa@gmail.com> | 2023-04-25 22:52:40 -0400 |
commit | a105f0bd73ef8373e4487bfa0e19462121be3f61 (patch) | |
tree | 0a689c9df510768e478fb92117699d5d23718165 /part1/unicafe | |
parent | ff58edc98a1224fa24a006b7d5273fbf0c1e2c29 (diff) |
ex 1.7
Diffstat (limited to 'part1/unicafe')
-rw-r--r-- | part1/unicafe/src/App.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/part1/unicafe/src/App.js b/part1/unicafe/src/App.js index efb32a2..1b6f57e 100644 --- a/part1/unicafe/src/App.js +++ b/part1/unicafe/src/App.js @@ -30,8 +30,11 @@ const App = () => { <Display text="good" count={good} /> <Display text="neutral" count={neutral} /> <Display text="bad" count={bad} /> + <Display text="all" count={good + neutral + bad} /> + <Display text="average" count={(good - bad) / 9.0} /> + <Display text="positive(%)" count={(good/(good + neutral + bad)) * 100} /> </div> ) } - + export default App |