#38810: b791


106019@yuteh.ntpc.edu.tw (Sherwin趙軒)

學校 : 臺北市私立復興實驗高級中學
編號 : 258028
來源 : [60.250.123.203]
最後登入時間 :
2024-10-21 19:33:00
b971. 等差數列 -- 板橋高中教學題 | From: [42.79.185.70] | 發表日期 : 2023-12-25 19:58

gooooo

#include <iostream>

try it

using namespace std;

i tried

int main() {
    int firstTerm, lastTerm, commonDifference;
    cin >> firstTerm >> lastTerm >> commonDifference;

gooooo you can do it

    int currentTerm = firstTerm;
    while (currentTerm <= lastTerm) {
        cout << currentTerm << " ";
        currentTerm += commonDifference;
    }

   come on lets go!!!

cout << endl;
    return 0;
}

 
ZeroJudge Forum