membuat segitiga bintang


#include
int main()
{
int n, x, y, c, q;
printf("Nama : afit miranto\n");
printf("NPM : G1D009001\n");
printf("Prodi: Teknik Elektro\n\n");
printf("segitiga bintang\n");
printf("ketikkan banyaknya baris: ");
scanf("%d",&n);
for (y = 0; y < n; y++)
{
.
for(q = 0; q < n - y; q++)
{
printf("*");
}
printf("\n");
}
printf("\n");
return 0;

}

Categories:

0 comments:

Post a Comment