#include
#include
#include
void bintang(int a,int b);
void bintang1(int a,int b);
void main()
{ int cacah;
cout<<"Masukkan banyaknya * : ";
cin>>cacah;
cout<
{ for(int b=cacah;b-(a-1)>0;b--)
cout<<"*";
cout<
cout<
getch();
}
void bintang(int a,int b)
{ if(b-(a-1)>0)
{ cout<<"*";
bintang(a,b-1);
}
else
cout<
void bintang1(int a,int b)
{ if(a>0)
{ bintang(a,b);
bintang1(a-1,b);
}
}
No comments:
Post a Comment