desperately study for better
IP ,
knowledge, Skill, and
future

belajar membuat web: HTML

Struktur dasar dari html adalah sebagai berikut

<head>

</head>
<body>

</body>


Bagian head adalah untuk menyimpan kode kode pendukung untuk body missal css
Bagian body digunakan untuk tampilan web misal

<head>

</head>
<body>
hai saya sedang belajar html
</body>

Buka teks editor (notepad++), dan masukan kode diatas
Simpan dengan nama tes.html
Setelah disimpan buka tes.html tersebut dengan Mozilla firefox. Maka akan tampil text hai saya sedang belajar html pada firefox tersebut

sudah mengerti kan dasarnya? Kita mengetik kode pada text editor, kemudian browser akan menerjemahkan kode tadi dan menampilkan sebuah halaman web
berikut ini adalah kode kode yang saya kumpulkan agar anda dapat lebih memahami pelajaran html ini.


source code



gak jadi deh di w3s sudah cukup lengkap sepertinya. silakan pergi kesini saja

karakter karakter yang dapat ditulis dalam bahasa C

Berikut ini adalah daftar karakter karakter special yang dapat ditulis dalam bahasa c


\b
backspace BS
\f
form feed FF (also clear screen)
\n
new line NL (like pressing return/enter)
\r
carriage return CR (cursor to start of line)
\t
horizontal tab HT
\v
vertical tab (not all versions)
\"
double quotes (not all versions)
\'
single quote character '
\\
backslash character \
\ddd
character ddd where ddd is an ASCII code given in octal or base 8, See Character Conversion Table.
\xddd
character ddd where ddd is an ASCII code given in hexadecimal or base 16, See Character Conversion Table.

Character Conversion Table

berikut ini adalah tabel Karakter Conversion Table untuk desimal, octal,dan hexadesimal

Decimal  Octal  Hexadecimal  Character

0 0 0 CTRL-@
1 1 1 CTRL-A
2 2 2 CTRL-B
3 3 3 CTRL-C
4 4 4 CTRL-D
5 5 5 CTRL-E
6 6 6 CTRL-F
7 7 7 CTRL-G
8 10 8 CTRL-H
9 11 9 CTRL-I
10 12 A CTRL-J
11 13 B CTRL-K
12 14 C CTRL-L
13 15 D CTRL-M
14 16 E CTRL-N
15 17 F CTRL-O
16 20 10 CTRL-P
17 21 11 CTRL-Q
18 22 12 CTRL-R
19 23 13 CTRL-S
20 24 14 CTRL-T
21 25 15 CTRL-U
22 26 16 CTRL-V
23 27 17 CTRL-W
24 30 18 CTRL-X
25 31 19 CTRL-Y
26 32 1A CTRL-Z
27 33 1B CTRL-[
28 34 1C CTRL-\
29 35 1D CTRL-]
30 36 1E CTRL-^
31 37 1F CTRL-_
32 40 20
33 41 21 !
34 42 22 "
35 43 23 #
36 44 24 $
37 45 25 %
38 46 26 &
39 47 27 '
40 50 28 (
41 51 29 )
42 52 2A *
43 53 2B +
44 54 2C ,
45 55 2D -
46 56 2E .
47 57 2F /
48 60 30 0
49 61 31 1
50 62 32 2
51 63 33 3
52 64 34 4
53 65 35 5
54 66 36 6
55 67 37 7
56 70 38 8
57 71 39 9
58 72 3A :
59 73 3B ;
60 74 3C <
61 75 3D =
62 76 3E >
63 77 3F ?
64 100 40 @
65 101 41 A
66 102 42 B
67 103 43 C
68 104 44 D
69 105 45 E
70 106 46 F
71 107 47 G
72 110 48 H
73 111 49 I
74 112 4A J
75 113 4B K
76 114 4C L
77 115 4D M
78 116 4E N
79 117 4F O
80 120 50 P
81 121 51 Q
82 122 52 R
83 123 53 S
84 124 54 T
85 125 55 U
86 126 56 V
87 127 57 W
88 130 58 X
89 131 59 Y
90 132 5A Z
91 133 5B [
92 134 5C \
93 135 5D ]
94 136 5E ^
95 137 5F _
96 140 60 `
97 141 61 a
98 142 62 b
99 143 63 c
100 144 64 d
101 145 65 e
102 146 66 f
103 147 67 g
104 150 68 h
105 151 69 i
106 152 6A j
107 153 6B k
108 154 6C l
109 155 6D m
110 156 6E n
111 157 6F o
112 160 70 p
113 161 71 q
114 162 72 r
115 163 73 s
116 164 74 t
117 165 75 u
118 166 76 v
119 167 77 w
120 170 78 x
121 171 79 y
122 172 7A z
123 173 7B {
124 174 7C |
125 175 7D }
126 176 7E ~
127 177 7F DEL

Most common syntax error in c programming

Error is dividing in 2 parts, syntax error and logic error

Logic error is hard to find, no easy way to detect it

Syntax error is easier since the dev c will give error message if there are syntax error, here is the common errors in c programming

1. Forgot the “;” in the end of statement à the most common beginner mistake

2. Case sensitive, a and A is different in c language, make sure you type it right

3. What header should I include? if you type the statement sin(x) but you don’t include the header math.h there will be an error when you compile the program, but what about the other statement? Here the list of header and the statement in dev c (you can also see this list in the help file dev c with keyword:header)

List of header



Input and Output: <stdio.h>

FILE *fopen(const char *filename, const char *mode)
FILE *freopen(const char *filename, const char *mode, FILE *stream)
int fflush(FILE *stream)
int fclose(FILE *stream)
int remove(const char *filename)
int rename(const char *oldname, const char *newname)

FILE *tmpfile(void)
char *tmpnam(char s[L_tmpnam])
int setvbuf(FILE *stream, char *buf, int mode, size_t size)
void setbuf(FILE *stream, char *buf)
int fprint(FILE *stream, const char *format, ...)
int sprintf(char *s, const char *format, ...)
vprintf(const char *format, va_list arg)
vfprintf(FILE *stream, const char *format, va_list arg)
vsprintf(char *s, const char *format, va_list arg)
int fscanf(FILE *stream, const char *format, ...)
int scanf(const char *format, ...)

int sscanf(char *s, const char *format, ...)
int fgetc(FILE *stream)
char *fgets(char *s, int n, FILE *stream)
int fputc(int c, FILE *stream)
int fputs(const char *s, FILE *stream)
int getc(FILE *stream)
int getchar(void)
char *gets(char *s)
int putc(int c, FILE *stream)
int putchar(int c)
int ungetc(int c, FILE *stream)
size_t fread(void *ptr, size_t size, size_t nobj, FILE *stream)
size_t fwrite(const void *ptr, size_t size, size_t nobj, FILE *stream)

int fseek(FILE *stream, long offset, int orogin)
long ftell(FILE *stream)
void rewind(FILE *stream)
int fgetpos(FILE *stream, fpos_t *ptr)
int fsetpos(FILE *stream, const fpos_t *ptr)
void clearerr(FILE *stream)
int feof(FILE *stream)
int ferror(FILE *stream)
void perror(const char *s)


Character Class Tests: <ctype.h>

isalnum(c)
isalpha(c)
iscntrl(c)
isdigit(c)
isgraph(c)
islower(c)
isprint(c)
ispunct(c)
isspace(c)
isupper(c)
isxdigit(c)

String Functions: <string.h>

char *strcpy(s , ct)
char *strncpy(s , ct , n)
char *strcat(s , ct)
char *strncat(s , ct , n)
int strcmp(cs , ct)
int strncmp(cs , ct ,n)
char *strchr(cs , c)
char *strrchr(cs , c)
size_t strspn(cs , ct)
size_t strcspn(cs , ct)
char *strstr(cs , ct)
size_t strlen(cs)
char *strerror(n)
char *strtok(s , ct)


Mathematical Functions: <math.h>

sin(x)
cos(x)
tan(x)
asin(x)
acos(x)
atan(x)
atan2(x)

sinh(x)
cosh(x)
tanh(x)
exp(x)
log(x)
log10(x)
pow(x,y)
sqrt(x)
ceil(x)
floor(x)
fabs(x)
ldexp(x)
frexp(x,double *ip)
modf(x,double *ip)
fmod(x,y)


Utility Functions: <stdlib.h>

double atof(const char *s)
int atoi(const char *s
long atol(const char *s)
double strrod(const char *s, char **endp)
long strtol(const char *s, char **endp, int base)
unsigned long strtoul(const char *s, char **endp, int base)
int rand(void)
void srand(unsigned int seed)

void *calloc(size_t nobj, size_t size)
void *malloc(size_t size)
void *realloc(void *p, size_t size)
void free(void *p)
void abort(void)
void exit(int status)
int atexit(void (*fcn)(void))
int system(const char *s)
char *getenv(const char *name)
void *bsearch(const void *key, const void *base, size_t n, size_t size, int (*cmp)(const void *keyval, const void *datum))
void qsort(void *base, size_t n, size_t size, int (*cmp)(const void *, const void *))

int abs(int n)
long labs(long n)
div_t div(int num, int denom)
ldiv_t ldiv(long num , long denom)


Diagnostics: <assert.h>

void assert(int expression)


Non-local Jumps: <setjmp.h>

int setjmp(jmp_buf env)
void longjmp(jmp_buf env, int val)



Signals: <signal.h>

void (*signal(int sig, void (*handler)(int)))(int)

Data and Time Functions: <time.h>

clock_t clock(void)

time_t time(time_t , *tp

double difftime(time_t time2 , time_t time1)

time_t mktime(struct tm *tp)

char *asctime(const time_t *tp)

char *ctime(const time_t *tp)

struct tm *gmtime(const time_t *tp)

struct tm *localtime(const time_t *tp)

size_t strftime(char *s, size_t smax, const char *fmt, const struct tm *tp)

get started with C

Get started with c,
1. Download the bloodshed dev c in www.bloodshed.com and install it
2. Open the dev c and Read the help file carefully, it contains more than enough information and tutorial for c beginner
3. Just write some code and test it, the easiest way to test your code is press ctrl+f9 to compile the file, open the cmd (start --> run --> type “cmd” without colon --> press enter), go to the directory where you compile the file, drag the .exe file to your cmd.
4. Another way to test the file is press f9 after you finish write the code, but I will recommend you to add this code:

getch();

before the last “}”.
Why must we add the code ?, the getch(); code is used for waiting an input. So, the screen will be appear as long as you don’t enter any input
5. Okay, here is some sample code that I type for you, just ask yuki-chan or write in the shoutoutbox/comment box if you have problem or find any bugs :)

hello world
#include<stdio.h>
#include<conio.h>

main()
{printf("hello world");

getch();//with this the screen will not dissapear immediattely
}

Memasukan input

#include<stdio.h>
#include<conio.h>
#include <stdlib.h>

float bilangan1;
int bilangan2;


main()
{
printf("masukan bilangan desimal \n");
scanf("%f",&bilangan1 );
printf("bilangan yang tadi anda masukan adalah %f \n\n", bilangan1);

printf("masukan bilangan bulat \n");
scanf("%i",&bilangan2 );
printf("bilangan yang tadi anda masukan adalah %i \n\n", bilangan2);



getch();//with this the screen will not dissapear immediattely


}
Penjumlahan

#include<stdio.h>
#include<conio.h>
float bilangan1, bilangan2, hasil;

main()
{
printf("masukan bilangan pertama \n");
scanf("%f",&bilangan1 );
printf("masukan bilangan kedua \n");
scanf("%f",&bilangan2 );

hasil=bilangan1 + bilangan2;
printf("bilangan pertama ditambah bilangan kedua adalah %f", hasil);

getch();////with this the screen will not dissapear immediattely

}