^^ Coding Bintang^^
#include
#include
main()
{
clrscr();
int n,i,j;
char ulang;
cout << " ===================================================== \n";
cout << " + Membuat Segitiga yang di putar 90 derajat + \n";
cout << " ==================================================== \n \n";
cout << endl;
cout << endl;
//Menampilakan segitiga dari 1 sampai n
for (i = 1; i<=n;i++)
{
for (j = 1; j<=i;j++)
cout << "*";
cout << endl;
}
//menampilakan bagian yang merupakan pencerminan dari setengah segitiga pertama
for (i=n-1;i>=1;i--)
{
for (j=1;j<=i;j++)
cout << "*";
cout << endl;
}
getch();
}
^^ Coding Angka-Angka Teks^^
#include
#include
int angka;
main()
{
cout << " ==================================================== \n";
cout << " + Program Konversi Angka Ke Teks + \n ";
cout << " ==================================================== \n";
cout<
cin>>angka;
clrscr();
cout<
break;
case 2:cout<<" (Dua)";
break;
case 3:cout<<" (Tiga)";
break;
case 4:cout<<" (Empat)";
break;
case 5:cout<<" (Lima)";
break;
case 6:cout<<" (Enam)";
break;
case 7:cout<<" (Tujuh)";
break;
case 8:cout<<" (Delapan)";
break;
case 9:cout<<" (Sembilan)";
break;
case 10:cout<<" (Sepuluh)";
break;
default:
cout<<" Data Salah...!!!";
cout<
break;
}
cout<
getch();
}
0 komentar:
Posting Komentar