Pemrograman C++
Tuesday, November 19, 2013
Perulangan "Do-While"
#include <iostream>
using namespace std;
int main(){
int a;
int n;
int b=0;
cout<<"masukkan input=";
cin>>n;
a=n-1;
do
{
b=0;
do
{
cout<<b <<"";
b++;
}while (b<=a);
cout<<"\n";
a--;
}
while (a>=0);
}
Hasil nya :
Selamat Mencoba...
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment