Breaking News
Loading...
Kamis, 21 Januari 2016

Kode C / C++ Menampilkan Bintang Segitiga






Berikut ini adalah source kodenya:

#include <stdio.h>
#include <conio.h>

int main()
{

clrscr();
int i,n,j;
printf(“input: “);
scanf(“%d”,&n);

for(i=1;i
{
for(j=1;j<=n;j++)
printf(” “);
for(j=1;j<=i;j++)
printf(“*”);
printf(“\n”);
}
getch();
return 0;
}





0 komentar:

Posting Komentar

:) :)) ;(( :-) =)) ;( ;-( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ $-) (b) (f) x-) (k) (h) (c) cheer
Click to see the code!
To insert emoticon you must added at least one space before the code.

 
Toggle Footer