kulo nuwun,
mau posting program c, yang segitiga, yaah walupun sederhana, tapi lumayan buat sarana pembelajaran juga ini koding nya..
#include
int main()
{
int i,j,tinggi ;
printf("masukkan tinggi segitiga: ");
scanf("%d",&tinggi);
for (i = 1; i <= tinggi; i++)
{
for (j= 1; j <=i; j++)
printf("*");
printf("\n"); /*pindah baris*/
}
return 0;
}
output nya
program segitiga c
This entry was posted on Rabu, 23 Maret 2011. You can follow any responses to this entry through the RSS 2.0. You can leave a response.