FOR
=>perulangan menggunakan for naik#include <cstdlib>
#include <iostream>
using namespace std;
class vivin{
private:
int x;
public:
vivin();
void proses();
};
vivin::vivin(){
cout<<"menghitung nilai perulangan for 1-9";
cout<<endl;
cout<<"vivin villiani rosadi";
}
void vivin::proses(){
for(x=1;x<=9;x++)
cout<<x<<endl;
}
int main(int argc, char *argv[])
{
vivin v;
v.proses();
cout<<endl;
system("PAUSE");
return EXIT_SUCCESS;
}
settelah di compile:
setelah di run :
PERULANGAN WHILE
=> c++ naik nya :
setelah di run:
=> c++ turunny
REPEAT UNTIL
=> c++ naikknya :
=> c++ turunnya :
wow....
BalasHapusMantab!!!
I Like It