We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
here is my code , my code fails in hidden test case no 2 , can anyone help me , i need my code to as input++ simultaneoulsy count++ , i can't figure it out can anyone help me
read n
sum=0
count=0
while [ n ]
do
read num
sum=((count + 1))
done
avg=sum / avg
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Compute the Average
You are viewing a single comment's thread. Return to all comments →
here is my code , my code fails in hidden test case no 2 , can anyone help me , i need my code to as input++ simultaneoulsy count++ , i can't figure it out can anyone help me read n
sum=0 count=0
while [ n ] do read num sum=((count + 1)) done avg=sum / avg