Select Menu

Search This Blog

Populer Posts Hari ini

Popular Posts

Powered by Blogger.

Lorem 1

adsense

" });

Circle Gallery

" });

News

" });
» » fungsi for membuat piramida dengan bahasa C

#include<stdio.h>
#include<conio.h>
int main(){
    int n,a,b,x,d;
    printf("Masukkan Batas Bintang = ");scanf("%d", &n);
    printf("Hasilnya :\n");
    for( a=1; a<=5; a++){
        for( b=a; b<=n; b++){
            printf(" ");
        }
         x=a+a-1;
        for( d=1; d<=x; d++){
                printf("*");
        }printf("\n");
    }
    getch();
}

About andi

«
Next
Newer Post
»
Previous
Older Post

1 komentar