Listing Perulangan Menurun
#include <iostream>
using namespace std;
int main ()
{
int bil;
cout<<"perulangan menurun "<<endl;
for (bil=10;bil>0;bil--)
cout<<bil<<endl;
return 0;
}
Listing Perulangan Menaik
#include <iostream>
using namespace std;
int main ()
{
int bil;
cout<<"perulangan naik "<<endl;
for (bil = 1;bil<10;bil++)
cout<<bil<<endl;
return 0;
}
#include <iostream>
using namespace std;
int main ()
{
int bil;
cout<<"perulangan menurun "<<endl;
for (bil=10;bil>0;bil--)
cout<<bil<<endl;
return 0;
}
Listing Perulangan Menaik
#include <iostream>
using namespace std;
int main ()
{
int bil;
cout<<"perulangan naik "<<endl;
for (bil = 1;bil<10;bil++)
cout<<bil<<endl;
return 0;
}
Comments
Post a Comment