基本数据类型与运算.pptVIP

  • 1
  • 0
  • 约1.63万字
  • 约 58页
  • 2019-12-24 发布于湖北
  • 举报
Trace ComputeChange int remainingAmount = (int)(amount * 100); // Find the number of one dollars int numberOfOneDollars = remainingAmount / 100; remainingAmount = remainingAmount % 100; // Find the number of quarters in the remaining amount int numberOfQuarters = remainingAmount / 25; remainingAmount = remainingAmount % 25; // Find the number of dimes in the remaining amount int numberOfDimes = remainingAmount / 10; remainingAmount = remainingAmount % 10; // Find the number of nickels in the remaining amount int numberOfNickels = remainingAmount / 5; remainingA

文档评论(0)

1亿VIP精品文档

相关文档