Cara Coding Program Segitiga Siku - Siku di Dev c
Berikut Cara Coding Program Segitiga Siku - Siku di Dev c :
#include<stdio.h>
#include<conio.h>
main()
{
int i,j,n ;
printf("\t\t\tProgram Segitiga Siku - Siku\n\n");
printf("input n :");scanf("%d", &n);
for(i=1;i<=n;i++)
{for(j=1;j<=i;j++)
printf("*");
printf("\n");}/*mencetak enter, agar bintang dicetak di baris berikutnya*/
getch ();
return 0;
}
coding :
hasil:
#include<stdio.h>
#include<conio.h>
main()
{
int i,j,n ;
printf("\t\t\tProgram Segitiga Siku - Siku\n\n");
printf("input n :");scanf("%d", &n);
for(i=1;i<=n;i++)
{for(j=1;j<=i;j++)
printf("*");
printf("\n");}/*mencetak enter, agar bintang dicetak di baris berikutnya*/
getch ();
return 0;
}
coding :
hasil:
Post a Comment