#does anyone know how to fix this code

1 messages ยท Page 1 of 1 (latest)

glad kestrelBOT
#

<@&987246399047479336> please have a look, thanks.

glad kestrelBOT
#

While you are waiting for getting help, here are some tips to improve your experience:

Code is much easier to read if posted with syntax highlighting and proper formatting.

If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.

Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.

#

Here is an AI assisted attempt to answer your question ๐Ÿค–. Maybe it helps! In any case, a human is on the way ๐Ÿ‘. To continue talking to the AI, you can use </chatgpt:1108714622413963314>.

#

Without seeing the code, it is difficult to provide a specific solution. However, here are some general steps you can follow to fix the issue:

  1. Check if the discount calculation is correct: Make sure that the discount calculation is accurate and returns the expected value. Verify that the discount percentage is being applied correctly to the original amount.

  2. Check if the data types are correct: Ensure that all variables used in the calculations have appropriate data types. For example, if you are working with decimal numbers, use double instead of int to avoid truncation or rounding errors.

  3. Verify if the output formatting is correct: Check if the code includes proper formatting for outputting decimal values. You may need to use DecimalFormat or String.format() to format the output as desired.

  4. Debug and print intermediate values: Insert print statements or use a debugger to check intermediate values during execution. This will help identify any unexpected changes or errors in calculations.

  5. Consider edge cases: Test your code with different input values, including edge cases such as zero amounts or maximum discounts, to ensure it handles all scenarios correctly.

If you can provide more details about your code and specific issues you are facing, it would be easier to provide a more targeted solution.

brazen jetty
#

0 * anything = 0

#

initialize amount variable first

#

btw i think you forgot you made amount a public private

#

not public

#

never do this

#

make a getter and setter method

#

jake chu really did you dirty like that

drifting fossil
brazen jetty
#

did you read

#

the rest of my message