CONTOH PROGRAM PERULANGAN FOR C++

#include <iostream>

/* run this program using the console pauser or add your own getch, system("pause") or input loop */
using namespace std;
int main(int argc, char** argv) {

int n,i;
i=10;
for (n=0; n!=i ; n++){
cout<<"Nilai n = "<<n<<" -- ";
cout<<"Nilai i = "<<i<<endl;
}

return 0;

}

selamat mencoba :)

Comments