"Ranger Fafa"
A blog for submitting my assignments
Senin, 08 November 2010
Algoritma dari Program Faktorial
Menentukan nilai faktorial dari suatu bilangan
Pada TPW 1.5
- Tentukan bilangan yang akan dicari nilai faktorialnya ( misal : 7)
- Masukkan rumus fak*i maka i = n down to 1.Maka cara perhitungannya yaitu 7x6x5x4x3x2x1
- Hasil
Pada TPW 1.5
Hasil Program
Kamis, 28 Oktober 2010
TPW 1.5
program sudut;
uses wincrt;
var
a:Longint;
begin
repeat
ClrScr;
writeln('program mengetahui jenis sudut');
write('masukkan besar sudut[1..180]:');
readln(a);
uses wincrt;
var
a:Longint;
begin
repeat
ClrScr;
writeln('program mengetahui jenis sudut');
write('masukkan besar sudut[1..180]:');
readln(a);
Permasalahan yang Mengandung "If......then...else"
Mengetahui Jenis Sudut
1. Memasukkan besar sudut
2. Jika 0 < besar sudut < 90 maka disebut sudut lancip
3. Jika besar sudut = 90 maka disebut sudut siku-siku
4. Jika 90 < besar sudut < 180 maka disebut sudut tumpul
5. Jika besar sudut = 180 maka disebut sudut berpelurus
Flowchart
Minggu, 10 Oktober 2010
Algoritma dan Flowchart Syarat Mengikuti Pemilu
Syarat-syarat warga negara yang memiliki hak pilih Pemilu
1. Warga Negara Indonesia (WNI)
2. Berusia 17 tahun ke atas atau sudah menikah
3. Terdaftar sebagai calon pemilih
4. Tidak sedang terganggu jiwanya
5. Tidak sedang dicabut hak pilihnya berdasarkan keputusan pengadilan yang telah memperoleh hukum tetap
Flowchart
Minggu, 26 September 2010
Origins of Pascal
The Pascal language was named for Blaise Pascal, a French mathematician who was a pioneer in computer development history. In 1641, at the age of eighteen, Pascal constructed the first arithmetical machine, arguably the first computer. He would improve upon the instrument eight years later. In 1650, Pascal left the world of geometry and physics, and shifted his focus towards religious studies, or, as Pascal wrote, to "contemplate the greatness and the misery of man." Pascal died in Paris on August 19, 1662.
The earliest computers were programmed in machine code and assembly. This type of programming is tedious and error prone, as well as extremely difficult to understand and modify. Programming is a time-consuming and expensive process. High level languages were developed to resolve this problem. High level languages provide a set of instructions that read like English, but can be translated by a program called a compiler into machine code. Pascal is one such language.
Other high level languages developed in the early years of the computer were FORTRAN (1957), COBOL (1959), ALGOL (1960), APL (1962), BASIC (1964), C (1972) and Ada (1983), to name a few. One problem with many of the early languages (e.g., FORTRAN and BASIC) was the heavy dependency on the use of "goto" instructions. "Goto" instructions tell the computer to jump from one step to another, enabling the computer to skip steps or to go back to repeat earlier steps. This type of sporadic branching increases the difficulty of debugging code. Additionally, languages like COBOL were designed with over-elaborate definitions, weak data structures support, and a lack of flexibility, making programs tedious to code and difficult to enhance.
The earliest computers were programmed in machine code and assembly. This type of programming is tedious and error prone, as well as extremely difficult to understand and modify. Programming is a time-consuming and expensive process. High level languages were developed to resolve this problem. High level languages provide a set of instructions that read like English, but can be translated by a program called a compiler into machine code. Pascal is one such language.
Other high level languages developed in the early years of the computer were FORTRAN (1957), COBOL (1959), ALGOL (1960), APL (1962), BASIC (1964), C (1972) and Ada (1983), to name a few. One problem with many of the early languages (e.g., FORTRAN and BASIC) was the heavy dependency on the use of "goto" instructions. "Goto" instructions tell the computer to jump from one step to another, enabling the computer to skip steps or to go back to repeat earlier steps. This type of sporadic branching increases the difficulty of debugging code. Additionally, languages like COBOL were designed with over-elaborate definitions, weak data structures support, and a lack of flexibility, making programs tedious to code and difficult to enhance.
Sabtu, 25 September 2010
Suatu Masalah dengan Algoritma dan Flowchart
Menentukan Bilangan Kelipatan 3
- Tentukan bilangannya
- Bagi bilangan tersebut dengan 3
- Lihat apa ada sisanya
- Jika tidak ada sisa maka bilangan tersebut kelipatan 3
- Bilangan kelipatan 3
Langganan:
Komentar (Atom)