top of page

[Solved Source for: Quarterly Sales Statistics · GitHub](^2^)

  • margekekurvi
  • Aug 18, 2023
  • 1 min read


Ask the user to enter four quarterly sales figures for six divisions of a company. The figures should be stored in a two dimensional array. Once the figures are entered, the program should display the following data:


However, in this example the primitive type short int is used for both the monthly and the quarterly sales variables. In C the short int primitive type has a maximum value of 32768. This creates a potential integer overflow if the value for the three monthly sales adds up to more than the maximum value for the short int primitive type. An integer overflow can lead to data corruption, unexpected behavior, infinite loops and system crashes. To correct the situation the appropriate primitive type should be used, as in the example below, and/or provide some validation mechanism to ensure that the maximum value for the primitive type is not exceeded.




quarterly sales statistics java

2ff7e9595c


 
 
 

Recent Posts

See All

Comments


© 2023 by Elijah Louis. Proudly created with Wix.com

bottom of page