I'm happy to do the psudo-code for you as this program is really simple.Although I won't be writing the code. I suggest you write some code following the below steps and once you get stuck, just raise another quetion with the code you've achieved.
make these variables: 1-sum (perhaps global but it doesn't matter in this case) 2-min_num ( it takes in user input)
**3-max_num **(it takes in user input)
then step 4 -> do some checking to see the variables (min_num & max_num) are not empty and contain some values. You'll need to parse them as integers or whatever type you're expecting from your users such as float. It might be a good idea to display a message if users are trying to use your calculator but they aren't entering anything or entering some text which is not acceptable.
5- Use an if-statement to compare min_num < max_num
6- inside your if-statement block.. do your formula. Here where you use the sum to store the result in then return it to users. And if you want to go a little nuts with the result you can say if sum <= 0, then you can return a message to your users saying.. The total is less than or equal to zero.