Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit cbfadb5

Browse files
Update Readme.md
1 parent 96066c6 commit cbfadb5

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,15 @@
11

2+
# PLUS MINUS HACKERRANK PROBLEM
3+
4+
## Problem statement
5+
6+
Given an array of integers, calculate the ratios of its elements that are positive, negative, and zero. Print the decimal value of each fraction on a new line with 6 places after the decimal.
7+
8+
e.g., array =[1,1,0,-1,-1] i.e., n=5 elements
9+
10+
so positives= 2/5, negatives= 2/5 and zeros = 1/5
11+
12+
then Output :
13+
0.400000
14+
0.400000
15+
0.200000

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /