Halaman

Pengikut

Minggu, 31 Januari 2010

english for 2nd post

Algorithm and examination program a number, is the number including a prime number or not

Look Aminah together Amin
Say Bismillah before begin


Hhhmm, we know that a prime number is a number which is not residual zero if devided by numbers instead 1 and it self, for example like this:
  • 7 is a prime number, because 7 only residual zero if devided by numbers 1 and it self
  • 11 is a prime number, because 11 only residual zero if devided by numbers 1 and it self
  • 8 is not prime number, because instead devided by numbers 1 and 8 self, 8 also residual zero if devided by number 2 and 4
  • 15 is not prime number, because instead devided by numbers 1 and 15 self, 15 also residual zero if devided by 3 and 5

Wah, this is just basic theory about what is definition of prime number, understand? understand ya.........? fortunately, if understand we will continue

For example a is number will be examined, is prime number or not, then:
  • a is a prime number if and only if a is not residual zero if devided by numbers instead 1 and a self,
  • Statement above can be written as follow: a is a prime number if and only if a is not residual zero if devided by numbers 2, 3, ..., a-1
  • If we suppose that b = 2, 3, ..., a, then its mean a is a prime number if and only if a mod b = 0 (we continue again yach......)


Before make program, first we will make the algorithm, number will be entered certain fulfill one of three conditions below:
  1. The number will be entered smaller than 2 (a < 2)
  2. The number will be entered is 2 (a = 2)
  3. The number will be entered larger than 2 (a > 2)

For number which smaller than 2, has certain is not prime number, because the prime number started form 2, and for number which larger than 2, then need to next examination, is the number prime number or not, so be obtained algorithm as follow:


If the algorithm above we write in Turbo Pascal Programming Language, then will be obtained syntax as follow, the syntax like what ya? like code below...

uses crt;
var a,b: longint;
begin clrscr;
writeln('PRIME NUMBER EXAMINATION PROGRAM');writeln(#10);
writeln('This program will ask input a number to know is the number prime number or not');
writeln(#10); write('input a number: '); readln(a);
if a<2 then writeln(a,' has certain is not prime number, because prime number started from 2');
if a=2 then writeln(a,' is a prime number');
for b:=2 to a-1 do
if a mod b = 0 then
begin
writeln(#10); writeln(a,' is a prime number');
b:=a-1;
end else
begin
if b=a-1 then
begin
writeln(#10); writeln(a,' is not prime number');
end;
end;
readln end.
huh the finally finish,

For friend who want the pascal file or .pas extension file can download it here, so that don’t need to rewrite in Turbo Pascal program, hehe, ^_^

Result from examination a number pascal programming, prime or not is a application or .exe file which can be downloaded here

The .doc file of this post can be downloaded here
accept my creation, thank you

Jumat, 08 Januari 2010

Tulisan yang ingin dibuat berwarna-warni

http://www.ichalcyutebeud.co.cc/2009/11/cara-membuat-linktulisan-pelangi.html

Selasa, 22 Desember 2009

atur tulisan

http://wahyoku.blogspot.com/2007/04/bagi-anda-yang-pengin-belajar-tentang.html

kode warna:
http://swarajangkrik.blogspot.com/2009/10/menulis-kode-warna-html.html

http://marchsya.blogspot.com/2009/04/kode-warna-html.html

http://ramadani.info/index.php/info-komputer/artikel-komputer/69-pengenalan-kode-html-

Sabtu, 28 November 2009

Prime Number Examination

Now will be to make a number examination program to know is the number included prime number or no. We know that prime number are numbers which remain is not zero if divided by number except 1 and its self. The prime number are 2, 3, 5, 7, 11, 13, 17, 19, ...

A number examination algorithm, is a number constitute prime number or no. The algorithm is as follows.
  1. Suppose that number will be entered is a, then we will examine is a constitute prime number or no. The final answer is a constitute prime number or a is not constitute prime number. Beginning thought is certain the number will be entered fulfill one of three conditions below, that is:
     a is smaller than 2 (a < 2 )
     a is 2 (a = 2)
     a is larger 2 (a > 2)
    Cause we know that prime number begin from 2, then certain all numbers are smaller than 2 are not prime number and 2 is the first prime number, until which need to next examine only numbers are larger than 2, then can make the beginning algorithm as follow.


  2. If a > 2, 2. If a > 2, then we will examine is there number from 2, 3, ..., a-1 which constitute factor of a, if found one or more between 2, 3, ..., a-1 which constitute factor of a then a is not prime number. We consider the number contitute factor of a with b, where b = 2, 3, ..., a-1, and b is said factor of a if and only if a mod b = 0. So, we need to examine as many (a-2) number, then the algorithm be:


If the algorithm above we pour into Pascal programming Leanguage, then will be could sintax like below:

uses crt;
var a,b:longint; j:char;
begin clrscr;
write('input a number which equals or larger than 2 : '); readln(a);
if a<2 then
begin
writeln('Sorry, the number has entered is not suitable with program message,');
writeln('then has certain ',a,' is not prime number');
end;
if a=2 then writeln('2 constitute prime number');
for b:=2 to a-1 do
begin
if a mod b = 0 then
begin
writeln(a,' is not prime number'); b:=a-1;
end else
if b=a-1 then writeln(a,' constitute prime number');
end;
readln
end.

For friends who want the pascal file of this algorithm or file which has extention .pas can donwload it here, so don’t need rewrite in Turbo Pascal again , hehe ^_^

The result of prime number examination which use Turbo Pascal Programming Leanguage is a application or file .exe which can be downloaded here

The .doc file of this post can be downloaded here

Selasa, 27 Oktober 2009

link

disini

Cara buat link ke email

Yahoo Emoticon

terindeks di google part 1

terindeks di google part 2

terindeks di google part 3

Text rata penuh


buat bullet dengan gambar sendiri

lihat juga ini

kode html

bullet


  • baris satu

  • baris dua

  • baris seterusnya



penomoran


  1. nomor satu

  2. nomor dua

  3. nomor tiga

  4. nomor seterusnya




buat tulisan warna pelangi

Tulisan yang ingin dibuat berwarna-warni

spasi pada blog

uses crt;
var a,b:longint; j:char;
begin clrscr;
write('masukkan sebuah bilangan yang sama atau lebih besar dari 2 : '); readln(a);
if a<2 then writeln('Maaf, bilangan yang dimasukkan tidak sesuai dengan permintaan program');
if a=2 then writeln('2 merupakan bilangan prima');
for b:=2 to a-1 do
begin
if a mod b = 0 then
begin
writeln(a,' bukan bilangan prima'); b:=a-1;
end else
if b=a-1 then writeln(a,' merupakan bilangan prima');
end;
readln
end.

Minggu, 11 Oktober 2009

belajar buat tabel






















1.

Baris ke 1 kolom ke 2

2.

Baris ke2 kolom ke 2

3.

Baris ke 3 kolom ke 2

Daftar Isi

asdkjfhkadsjfdsfdsfdsfjdsfk hdskjfh kdsjfhkjs adhfkjash dkjfh sadkjfh kadsjfh kjladshf kjladshf hdskjf hadskjhfkj ashdfkljh dsakjfh sdhfkl jadshfkjl hadskjf hkdsjlhf kjdshlkhkadshf kjhdsfjkhdskfj hkjdgshksdhgkjdshf kjhdsfkj hasdkjfh kjasdhf kjasdhfaskdjfh adsjghasdkjl asdfh s adsjh dsfh sdhkldshf hkasfh kladshf khsdkf hasdfkj hdsakhfkjldshf shdj fhsadk fjhkjdshf kjadshf dshaf kadshfk jhdsalfk hadslfh ldsjfh dskjfh kjdshf kjldshfkjl dshf klhsdklajhfdsk ajhfadskjhfdskajfh kjdsfhksjdfh kjash dfkjhdsk aljhfskadhf sjd

Followers

Buku tamu untuk sahabat

 

Copyright © 2009 by coretan sahabat