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.
solveMeFirst(){locala=$1localb=$2if((a<1||b>1000));thenecho"Error: inputs must be in range 1..1000">&2exit1fi# print the sumecho$((a+b))}# read two numbers (space- or newline-separated)read-raread-rbsolveMeFirst"$a""$b"
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Solve Me First
You are viewing a single comment's thread. Return to all comments →
Bash Solution: