Nama :
Ersus Saeful Hidayat
NIM :
49012050
JURUSAN :
TKJMD (Teknik Komputer Jaringan Media
Digital) – STEI - ITB
Link Video Fungsi Using Parameter klik disini
Source Code:
/*=====================================================================
Program Bintang Segitiga Samakaki Microsof Visual Studio
C++ 2012
Materi 10
Nama : Ersus
Saeful Hidayat
NIM :
49012050
Jurusan :
TKJMD (Teknik Komputer Jaringan Media Digital) - STEI - ITB
=====================================================================*/
#include <iostream> // Preprocessor
using namespace std;
int main ()
// Fungsi utama main
program
{
int i,j;
for (i=0; i <= 2; i++)
{
for (j=0; j <= i; j++)
{
cout
<< " ";
}
for (j=2; j >= i; j--)
{
cout
<< "*";
}
for (j = 2; j > i; j--)
{
cout
<< "*";
}
for (j=0; j
<= i; j++)
{
cout
<< " ";
}
cout
<< endl;
}
return 0;
}
Terimakasih! Semoga dapat bermanfaat
dan dapat difahami.
No comments:
Post a Comment