Membuat Tabel Dengan Bahasa C

Posted on Updated on


Coba buat tabel ni dengan bahasa c, tapi kali ini buatnya manual ya…



]

/* Tabel*/
#include<stdio.h>
#include<conio.h>
main()
{
 printf("Jadwal Waktu Shalat untuk wilayah Jambi dan sekitarnya\n\n");
 printf("Bulan JANUARY\n\n");
 printf (" | %-7s | %3s | %3s | %3s | %3s | %3s |\n\n", "Tanggal", "Subuh", "zuhur", "Ashar", "Magrb", "Isya'");
 printf (" | %-7s | %3s | %3s | %3s | %3s | %3s |\n", "1-2", "04.40", "12.11", "15.38", "18.19", "19.34");
 printf (" | %-7s | %3s | %3s | %3s | %3s | %3s |\n", "3-5", "04.42", "12.13", "15.39", "18.21", "19.35");
 printf (" | %-7s | %3s | %3s | %3s | %3s | %3s |\n", "6-8", "04.44", "12.14", "15.40", "18.22", "19.36");
 printf (" | %-7s | %3s | %3s | %3s | %3s | %3s |\n", "9-11", "04.45", "12.15", "15.41", "18.23", "19.37");
 printf (" | %-7s | %3s | %3s | %3s | %3s | %3s |\n", "12-14", "04.47", "12.17", "15.42", "18.24", "19.38");
 printf (" | %-7s | %3s | %3s | %3s | %3s | %3s |\n", "15-17", "04.49", "12.18", "15.43", "18.25", "19.38");
 printf (" | %-7s | %3s | %3s | %3s | %3s | %3s |\n", "18-20", "04.50", "12.19", "15.43", "18.26", "19.39");
 printf (" | %-7s | %3s | %3s | %3s | %3s | %3s |\n", "21-23", "04.51", "12.20", "15.44", "18.27", "19.39");
 printf (" | %-7s | %3s | %3s | %3s | %3s | %3s |\n", "24-26", "04.52", "12.20", "15.44", "18.27", "19.40");
 printf (" | %-7s | %3s | %3s | %3s | %3s | %3s |\n", "27-29", "04.53", "12.21", "15.44", "18.28", "19.40");
 printf (" | %-7s | %3s | %3s | %3s | %3s | %3s |\n\n", "30-31", "04.55", "12.21", "15.43", "18.28", "19.40");

printf("Selamat menunaikan ibadah Shalat Fardhu");
 getch();
 clrscr();
}


lihat hasilnya : 

tabel1

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s