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.
  • Hackerrank Home
  • Prepare
    NEW
  • Certify
  • Compete
  • Career Fair
  • Hiring developers?
  1. Prepare
  2. Linux Shell
  3. Bash
  4. The World of Numbers
  5. Discussions

The World of Numbers

Problem
Submissions
Leaderboard
Discussions
Editorial
Tutorial

Sort 150 Discussions, By:

recency

Please Login in order to post a comment

  • jonatanivanhoe
    3 weeks ago+ 0 comments
    #!/bin/bash
    read x; 
    read y;
    soma=`expr $x + $y`;
    echo $soma;
    diferenca=`expr $x - $y`;
    echo $diferenca;
    produto=`expr $x \* $y`;
    echo $produto;
    divisao=`expr $x / $y`;
    echo $divisao;
    
    0|
    Permalink
  • carlos_eog97
    4 weeks ago+ 0 comments
    #!/bin/bash
    
    read n1
    read n2
    
    echo $[n1 + n2]
    echo $[n1 - n2]
    echo $[n1 * n2]
    echo $[n1 / n2]
    
    0|
    Permalink
  • twist093
    1 month ago+ 0 comments

    Does anybody know why this version of code fails with error in this console...

    x=10
    y=11
    
    echo `expr "$x" "/" "$y"`
    expr "$x" "/" "$y"
    

    while this one works like a charm?

    x=10
    y=11
    
    expr "$x" "/" "$y"
    echo `expr "$x" "/" "$y"`
    
    0|
    Permalink
  • jobfresher28
    2 months ago+ 0 comments

    Here are the solution of The World of Numbers HackerRank Solution https://www.chase2learn.com/the-world-of-numbers-hackerrank-solution/

    0|
    Permalink
  • igorerchenko35
    2 months ago+ 0 comments
    read a
    read b
    echo -e "$(($a+$b))\n$(($a-$b))\n$(($a*$b))\n$(($a/$b))"
    
    0|
    Permalink
Load more conversations

Need Help?


View tutorial
View editorial
View top submissions
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy