menampilkan simbol atau karakter huruf pada program c++
Pada postingan kali ini, saya akan berbagi satu kode program C/C++
sederhana, kode program ini guna nya untuk menampilkan simbol-simbo atau karakter huruf dari program c. Pada program ini saya menggunakan struktur kontrol
dan struktur perulangan untuk menampilkan karakter yang di berikan oleh user.
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
#include <conio.h>
#include <windows.h>
int main()
{
system("COLOR 7C");
int i,j,k,x[100],n,ambil[100],a,d;
char tanya;
atas://------------------------------------------------------------------------>header
printf ("\n\t\t ===========================================\n");
printf ("\t=========== Selamat Datang di Program TKJA!2 ============\n");
printf ("\t\t =========== Copyright by: Achmad_Hunter ==========\n");
printf ("\t\t\t ===========================\n\n");
for (i=0;i<80;i++){ printf ("%c", 220); _sleep (15);}printf("\n\n");
int huruf_A[18][80]={
{0,1,1,1,1,0,0,0,0,0,0,1,1,0,0,0,0,0,1,1,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0},
{0,1,1,1,1,0,0,0,0,0,1,1,1,1,0,0,0,1,1,1,1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0},
{0,0,1,1,0,0,0,0,0,1,1,0,0,1,1,0,1,1,0,0,1,1,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0},
{0,0,1,1,0,0,0,0,1,1,0,0,0,0,1,1,1,0,0,0,0,1,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0},
{0,0,1,1,0,0,0,1,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0},
{0,0,1,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0},
{0,0,1,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0},
{0,0,1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,0,0,0,0,1,1,1,1,1,1,1,0,0,1,1,1,1,0,0,0,0,0,0,0},
{0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,0,0,0,0,0,0,1,1,1,0,0,0,0,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1},
{0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,0,0,0,0,0,0,1,1,1,0,0,0,0,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1}
};
for (i=0; i<18; i++)
{
for (j=0; j<80; j++)
if (huruf_A [i][j] !=0)
putchar ('\x1A');
else
putchar (' ');
putchar ('\n');
}
for (i=0; i<12; i++)
{
for (j=0; j<58; j++)
if (huruf_sekret [i][j] !=0)
putchar ('\x3A');
else
putchar (' ');
putchar ('\n');
}
for (i=0; i<13; i++)
{
for (j=0; j<80; j++)
if (huruf_B [i][j] !=0)
putchar ('\x2A');
else
putchar (' ');
putchar ('\n');
}
printf("\n\nApakah anda ingin mengulangi program(y/t)? ");scanf("%s",&tanya);//------------>footer
if(tanya=='y'){system("cls");goto atas;}else goto bawah;
bawah:
printf("\n\n"); for (i=0;i<80;i++){ printf ("%c", 220); _sleep(15);}
printf ("\n\n\t\t\t ===========================\n");
printf ("\t\t ===========================================\n");
printf ("\t======== terima kasih telah menggunakan program TKJA!2 =========\n");
printf ("\t\t ===========================================\n");
getch ();
}
Hasilnya Seperti Ini...
Sekian dulu ya teman-teman untuk kali ini, semoga postingan ini bermanfaat bagi kita semua dalam mempelajari Bahasa C++.
oke. salam dari achmadakib.blogspot.com
Untuk pengaplikasiannya dalam Program C++, dapat teman-teman lihat pada kode program C++ di bawah ini.
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
#include <conio.h>
#include <windows.h>
int main()
{
system("COLOR 7C");
int i,j,k,x[100],n,ambil[100],a,d;
char tanya;
atas://------------------------------------------------------------------------>header
printf ("\n\t\t ===========================================\n");
printf ("\t=========== Selamat Datang di Program TKJA!2 ============\n");
printf ("\t\t =========== Copyright by: Achmad_Hunter ==========\n");
printf ("\t\t\t ===========================\n\n");
for (i=0;i<80;i++){ printf ("%c", 220); _sleep (15);}printf("\n\n");
int huruf_A[18][80]={
{0,1,1,1,1,0,0,0,0,0,0,1,1,0,0,0,0,0,1,1,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0},
{0,1,1,1,1,0,0,0,0,0,1,1,1,1,0,0,0,1,1,1,1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0},
{0,0,1,1,0,0,0,0,0,1,1,0,0,1,1,0,1,1,0,0,1,1,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0},
{0,0,1,1,0,0,0,0,1,1,0,0,0,0,1,1,1,0,0,0,0,1,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0},
{0,0,1,1,0,0,0,1,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0},
{0,0,1,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0},
{0,0,1,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0},
{0,0,1,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0},
{0,0,1,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0},
{0,0,1,1,0,0,0,1,1,0,0,0,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1,1,1,1,1,1,1,1,1,1},
{0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,0,0,0,0,0,0,1,1,1,0,0,0,0,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1}
};
for (i=0; i<18; i++)
{
for (j=0; j<80; j++)
if (huruf_A [i][j] !=0)
putchar ('\x1A');
else
putchar (' ');
putchar ('\n');
}
for (i=0; i<12; i++)
{
for (j=0; j<58; j++)
if (huruf_sekret [i][j] !=0)
putchar ('\x3A');
else
putchar (' ');
putchar ('\n');
}
for (i=0; i<13; i++)
{
for (j=0; j<80; j++)
if (huruf_B [i][j] !=0)
putchar ('\x2A');
else
putchar (' ');
putchar ('\n');
}
printf("\n\nApakah anda ingin mengulangi program(y/t)? ");scanf("%s",&tanya);//------------>footer
if(tanya=='y'){system("cls");goto atas;}else goto bawah;
bawah:
printf("\n\n"); for (i=0;i<80;i++){ printf ("%c", 220); _sleep(15);}
printf ("\n\n\t\t\t ===========================\n");
printf ("\t\t ===========================================\n");
printf ("\t======== terima kasih telah menggunakan program TKJA!2 =========\n");
printf ("\t\t ===========================================\n");
getch ();
}
Hasilnya Seperti Ini...
Sekian dulu ya teman-teman untuk kali ini, semoga postingan ini bermanfaat bagi kita semua dalam mempelajari Bahasa C++.
oke. salam dari achmadakib.blogspot.com
Comments
Post a Comment