#3601. 枚举读程序

枚举读程序

题目描述

阅读程序,判断输出结果。

#include <iostream>
using namespace std;

int main() {
    int ans = 0;
    for (int i = 1; i <= 20; i++) {
        if (i % 3 == 0 && i % 5 == 0) {
            ans++;
        }
    }
    cout << ans;
    return 0;
}

{{ select(1) }}

  • A. 1
  • B. 3
  • C. 5
  • D. 6