Harmonyos应用实例23:100以内减法 - “减法智慧园“

📅 发布时间:2026/7/17 2:06:23 👁️ 浏览次数:
Harmonyos应用实例23:100以内减法 - “减法智慧园“
实例3:100以内减法 - “减法智慧园”教学点: 理解减法的含义(去掉一部分)。交互: 点击小球使其消失,计算剩余数量。// 减法智慧园 - 100以内减法 @Entry @Component struct SubtractionApp { @State minuend: number = 0; @State subtrahend: number = 0; @State borrowed: boolean = false; // 是否需要退位 @State userAnswer: string = ''; @State showResult: boolean = false; @State isCorrect: boolean = false; @State score: number = 0; @State useVisual: boolean = true; // 是否使用可视化 @State remainingCount: number = 0; aboutToAppear() { this.generateQuestion(); } build() { Column({ space: 20 }) { // 标题栏 Row() { Text('第二单元:100以内减法')