FOR
=>perulangan menggunakan for naik
#include <cstdlib>
#include <iostream>
using namespace std;
class ani{
private:
int x;
public:
ani();
void proses();
};
ani::anii(){
cout<<"menghitung nilai perulangan for 1-9";
cout<<endl;
cout<<"Anni kholilah Daulay";
}
void ani::proses(){
for(x=1;x<=9;x++)
cout<<x<<endl;
}
int main(int argc, char *argv[])
{
ani a();
a.proses();
cout<<endl;
system("PAUSE");
return EXIT_SUCCESS;
}
No comments:
Post a Comment