测评会员优惠活动进行中 · 开通 VIP,有效期内测评不限次 VIP 优惠中 · 测评不限次 立即查看

A61310. 有以下程序:#include <iostream>

单选题

题目描述

有以下程序:

#include <iostream> 
using namespace std; 
int main() {
    int s, a, n;
    s = 0;
    a = 1;
    cin >> n;
    do {
        s += 1;
        a -= 2;
    } while (a != n); 
    cout << s << endl; 
    return 0;
}

若要使程序的输出值为 2,则应该从键盘给 输入的值是( )。

选项(单选)