about | help | code help+videos | done | prefs |
Write a method called "sigNum" that returns information about the SIGN of the input parameter 'num'. There are three possible signs for numbers. Integers can be positive, negative, or unsigned. Zero is the only unsigned integer. To indicate a positive sign, return 1. To indicate a negative sign, return -1. To indicate unsigned, return 0. Look at the test date for examples. You may NOT use the "Math" library or any methods from that library. Of course you MAY use any normal math operations. quiz2021_10_12_APSLHL_sigNum(235) → 1 quiz2021_10_12_APSLHL_sigNum(423) → 1 quiz2021_10_12_APSLHL_sigNum(0) → 0 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 210
Copyright Nick Parlante 2017 - privacy