Как я могу сделать так, чтобы мой код пропускал строку в цикле for - PullRequest
0 голосов
/ 11 октября 2019

Я пытаюсь пропустить строку № 13, но я не знаю, как на самом деле это сделать

#include <iostream>

int main()
{
    using namespace std;
    int i, j;
    cout << "Type in the elevator where you want to proceed: "  << endl;
    cin >> j;
    for(i=1;  i<= j; i++) {
    if ( i==13)continue;
    cout << "Your elevator number is at: " << i << endl;
    }

    return 0;
}
...