#38810: b791


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

學校 : 不指定學校
編號 : 258028
來源 : [223.140.39.192]
最後登入時間 :
2024-04-22 20:20:27
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