Quick actions

cmd+k|ctrl+k

Navigation

Languages

For Increment > 1

Snippet info

Language

Cpp

Visibility

public

Author

wija.mw17

Created

2019-08-21T02:48:11Z

Updated

2019-08-21T02:53:15Z

#include <iostream>
using namespace std;

int inclebihdari1 {
    int x = 0;
    // for(x=0; x < 10; x+2) {     // Wrong
    for(x=0; x < 10; x+=2) {    // Right
        cout << "Isi x : "<< x << "\n";
    }
    return 0;
}

int decrlebihdari1 {
    int x = 0;
    // for(x=0; x < 10; x-2) {     // Wrong
    for(x=10; x > 0; x+=2) {    // Right
        cout << "Isi x : "<< x << "\n";
    }
    return 0;
}
int main() {
    decrlebihdari1();
    return 0;
}
INFO