Minggu, 09 Mei 2010

perbedaan array

Array satu dimensi adalah kumpulan elemen yang tersusun dalam satu baris.
- Array dua dimensi adalah array yang dapat membantu dalam pemrograman apabila arrray satu dimensi tidak mencukupi dalam menghasilkan suatu solusi. Array dua dimensi sebenarnya adalah array yang berisi array.
»»  READMORE...

Program Menghitung Ukuran / Panjang Array

#include
main()
{
cout<<"Program Menghitung Ukuran / Panjang Array"<int data[]={4,6,1,7,8,9};
int panjang;
panjang=sizeof(data)/sizeof(data[0]);
cout<<"Panjang Elemen Array= "<}
»»  READMORE...

program java menghasilkan output dari 1-10

Output 1-10 menggunakan FOR

#include
main()
{
int n;
cout<<"Masukkan Angka : ";
cin>>n;
for(int i=1;i<=n;i++)
{
cout<}
cout<<"Stop!!";
}



- Output 1-10 menggunakan WHILE

#include
void main()
{
int i=1;
while(i<=10)
{
cout<}
cout<<"Stop!!";
}



- Output 1-10 menggunakan DO-WHILE

#include
void main()
{
int i=1;
do
{
cout<}
while(i<=10);
cout<<"Stop!!";
}

»»  READMORE...

program sederhana java membuat menu menggunakan perulangan

#include
main(){
int x,y;
cout<<"1. Single Player \n";
cout<<"2. Multiplayer \n";
cout<<"\nSelect Game : ";
cin>>x;
switch(x){
case 1:
cout<<"\nSingle Player";
break;
case 2:
cout<<"\nMultiplayer\n";
cout<<"\nNumber of Player : ";
cin>>y;
for (int i=1;i<=y;++i){
cout<<"\nPlayer "<break;}
return 0;
}

»»  READMORE...

Jumat, 07 Mei 2010

Degrees Comparison

Kata sifat kuantitatif much dan little, dan kata sifat bilangan many and few, mempunyai tingkat

perbandingan (degrees comparison).

The degrees of comparison (tingkat perbandingan) berjumlah tiga tingkat, yaitu :

1. The positive degree (tingkat biasa)

2. The comparative (tingkat lebih/perbandingan)

3. The superlative (tingkat paling)

1) Kata sifat yang terdiri dari satu suku kata dan beberapa kata sifat bersuku kata dua dapat dibentuk comparative dengan menambahkan er atau r, dan superlative dengan menambahkan -est atau -st.

a) Jika positive berakhir dalam dua huruf mati atau dalam satu huruf mati yang didahului oleh dua huruf hidup, er dan est ditambahkan

Positive

thick

long

short

Comparative

thicker

longer

shorter

Superlative

thickest

longest

shortest

b) Jika positive berakhir dalam satu huruf mati dan huruf mati itu didahului oleh sebuah vokal pendek, huruf mati terakhir digandakan kemudian ditambahkan er dan est

Positive

big = besar

wet = basah

hot = panas

Comparative

bigger = lebih besar

wetter = lebih basah

hotter = lebih panas

Superlative

biggest = terbesar

wettest = terbasah

hottest = terpanas

c) Jika positive berakhir huruf e, hanya r dan st ditambahkan

Positive

nice = baik

fine = bagus

wise = bijaksana

Comparative

nicer = lebih baik

finer = lebih bagus

wiser = lebih bijak

Superlative

nicest = terbaik

finest = terbagus

wisest = terbijaksana

d) Jika positive berakhir huruf y, dan y itu didahului oleh huruf mati, y diubah menjadi I, lalu ditambahkan er dan est

Positive

wry = miring

dry = kering

happy = bahagia

Comparative

wrier = lebih miring

drier = lebih kering

happier = lebih bahagia

Superlative

wriest =paling miring

driest = terkering

happiest = terbahagia

e) Jika y didahului oleh sebuah huruf hidup, y tidak diubah menjadi i, tapi langsung ditambahkan r dan est

Positive

gay = riang

coy = pemalu

grey = mendung

Comparative

gayer = lebih riang

coyer = lebih pemalu

greyer = lebih mendung

Superlative

gayest = teriang

coyest = terpemalu

greyest = termendung

f) Kata sifat yang terdiri dari dua suku kata (two syllables) yang berakhiran some, ow, le, er, ditambahkan er dan est

Positive

wholesome

narrow

noble

clever

Comparative

wholesomer

narrower

nobler

clever

Superlative

wholesomest

narrowest

noblest

cleverest

2) Kata sifat yang bersuku kata dua – two syllables (yang tekanan suaranya jatuh pada suku kata awal) atau lebih, ditambahkan more untuk membentuk comperatives dan most untuk superlatives

Positive

famous = terkenal

useful = berguna

beautiful = cantik

Comparative

more famous

more useful

more beautiful

Superlative

most famous

most useful

most beautiful

3) Beberapa kata sifat dibentuk dengan cara tak beraturan (irregular) untuk comparatives dan superlatives

Positive

fore

bad

ill

evil

good

hind

late

late

little

much

nigh

old

old

near

Comparative

former

worse

worse

worse

better

hinder

later

latter

less

more

nigher

older

elder

nearer

Superlative

foremost,first worst

worst

worst

best

hindmost

latest

last

least

most

nighest,next

oldest

eldest

nearest

Catatan 1 :

a) Former = yang terlebih dahulu/tadi ; yang pertama (di antara dua benda).

Contoh: I prefer the former fabric. Saya lebih menyukai kain yang terlebih dahulu

Of the two methods I prefer the former. Diantara kedua metoda itu saya lebih menyukai yang pertama

b) Later = yang belakangan

Contoh: I will take the later plane. Saya mau naik kapal terbang yang belakangan

c) Latter = yang belakangan/yang terakhir (di antara dua benda)

Contoh: I will take the latter book. Saya mau membeli buku yang terakhir (di antara dua buah buku)

d) Latest = yang belakangan/yang terakhir sampai sekarang

Contoh: What is the latest news of the war? bagaimanakah kabar terbaru (terakhir) perang itu?

e) Last = yang terakhir (yang paling akhir/penghabisan)

Contoh: This is our last opportunity. Inilah kesempatan terakhir kita

Z is the last letter of the alphabet. Z adalah huruf terakhir abjad

Penjelasan :

Later berarti yang belakangan atau lebih lambat, menunjuk pada waktu

Contoh: She came to school later than I. Ia datang ke sekolah lebih lambat daripada saya

Latter menunjuk pada urutan yang kedua di antara dua hal atau benda yang baru saja disebut

Contoh: Alexandria and Cairo are large cities; the latter has a population of over a million.

Alexandria dan Kairo adalah kota besar ; yang belakangan (yaitu Kairo) mempunyai penduduk lebih dari satu juta orang

Latest berarti yang terakhir sampai sekarang, sedangkan last berarti yang paling terakhir atau

penghabisan.

Jika kita katakan :

Did you read Mr. Green’s latest book? apakah anda membaca buku terakhir/terbaru Tuan Green?

Ini berarti bahwa Tn. Green boleh jadi akan mengarang lagi buku lain.

Kalau kita katakan :

Did you read Mr. Green’s last book? apakah anda membaca buku terakhir Tn. Green?

Ini berarti bahwa Tn. Green tidak atau tidak akan menulis buku lain lagi setelah buku yang

dimaksudkan tadi.

Catatan 2 :

a) Elder juga bentuk comperative dari old. Perhatikan perbedaan pemakaian elder dan older.

Contoh: John is my elder brother. John adalah kakak laki-laki saya

John is older than Lisa. John lebih tua daripada Lisa

b) Eldest juga bentuk superlative dari old. Perhatikan perbedaan pemakaian eldest dan oldest:

She is my eldest daughter. Ia putriku yang sulung

That is the oldest hotel in the city. Itulah hotel yang tertua di kota ini

Penjelasan :

Elder dan eldest dipakai pada orang saja, dan paling sering dipakai pada orang dalam hubungan

kekeluargaan. Sedangkan older dan oldest dipakai untuk menyatakan umur atau usia yang lebih tua atau tertua pada orang atau pun benda.

4) Ada enam buah kata adverbs (kata keterangan) dalam bentuk positive degrees, tetapi adjectives (kata sifat) dalam bentuk comparative dan supelative

Positive

fore

far

in

out

neath

up

Comparative

further

farther

inner

outer

nether

upper

Superlative

furthest

farthest

innermost, inmost

uttermost, utmost

nethermost

uppermost

5) Kata-kata sifat tertentu tidak dapat diperbandingkan

perfect = sempurna

unique = unik

supreme = tertinggi

preferable = lebih baik

natural = alamiah

right = benar

wrong = salah

etc.

POSITIVE DEGREE (tingkat positif) digunakan untuk menunjukkan bahwa sesuatu itu sama tingkatannya. Perbandingan untuk sesuatu yang tingkatannya sama digunakan as … as.

Contoh: Ali is 1,6 meters and Anwar is also 1,6 meters.

Ali is AS TALL AS Anwar.

This book cost Rp. 2.000,-. That book costs Rp. 2.000,-

This book is AS EXPENSIVE AS that one

Bentuk negatif dari perbandingan ini adalah sebagai berikut:

Contoh: Jakarta is not AS WARM AS Surabaya.

Rumus :

as + positive + as

no less + positive + than

not more + positive + than

Contoh:

This girl is as clever as that. Anak perempuan ini sepandai anak perempuan itu

This girl is no less clever than that. Anak perempuan ini sama pandainya dengan anak perempuan itu

That girl is not more clever than this. Gadis itu tidak lebih pandai daripada gadis ini

(berarti gadis itu dan gadis ini sama pandainya)

B. COMPARATIVE DEGREE digunakan apabila dua orang atau benda dikatakan tidak sama dalam hal sifat yang tertentu Yang satu lebih dari yang lain. Tingkat perbandingan dinyatakan dengan menggunakan “-er” jika kata sifat itu hanya memiliki satu suku kata“than.” (one syllable) serta di tambah kata

Contoh: Handi is TALLER than Anton

A train is FASTER than a bus

Jika kata sifat itu diakhiri dengan le, r, ow, y, maka tambahkan “-er”. Jika kata sifat diakhiri dengan “y”, maka berubah menjadi “ier.”

Contoh: This problem is simpler than the one we had yesterday.

The street in front of my house is narrower than this one.

Comparative degree yang menggunakan lebih dari satu suku kata (two or more syllables) digunakan “more.” Suku kata maksudnya beautiful = beau-ti-ful (3 suku kata); expensive = ex-pen-sive (tiga suku kata), useful = use-ful (dua suku kata)

Contoh: TV Program are more interesting than radio program.

My trousers are more expensive than yours.

Rumus :

comparative + than

Contoh:

Lisa is taller than her sister. Lisa lebih tinggi daripada saudara perempuannya

Jakarta is bigger than Surabaya. Jakarta lebih besar daripada Surabaya

PERHATIKAN!

Aturan untukk dua suku kata (two syllabels) lebih rumit. Beberapa adjective membentuk comparative and superlative dengan –er, -est., beberapa dengan more, most, yang lainnya boleh kedua-duanya.

Two-syllable adjectives dengan –er, -est

1. Adjective berakhiran –y yang didahului oleh konsonan

Contoh: pretty – prettier, dirty – dirtier, noisy – noisier, happy – happier, unhappy – unhappier

2. Adjective berakhiran –ple, -ble, dan biasanya –tle, -dle

Contoh: simple – simpler, noble – nobler, humble – humbler, subtle – subtler, idle – idler

Two-syllable adjective dengan more, most

1. Sebagian besar adjective berakhir suffix derivatif: -ous, -ish, -ful, -ing, -ed, etc.

Contoh: more famous, more useful, more childish, more interesting, more tired

2. Sebagian besar adjective berakhiran –ct, -nt, -st

Contoh: more exact, more recent, more honest, more urgent

Two-Syllable adjective dengan –er, -est or more, most (yang bentuk –er, -est kurang formal)

1. Adjective berakhiran –er: cleverer, tenderer, bitterer

2. Adjective berakhiran –ow: narrower, shallower, mellower

3. Adjective berakhiran –some: hansomer, wholesomer, lonesomer

4. Others: penekanan pada suku kata pertama: pleasanter, crueler, quieter, stupider

Penekanan pada suku kata kedua: politer, profounder, remoter, obscurer, sincerer, severer, securer

C. SUPERLATIVE DEGREE (tingkat superlative) yaitu apabila seseorang atau sebuah benda dikatakan melebihi atau mengungguli semua orang atau benda yang lain yang sama macamnya, kita menggunakan superlative degree dengan the … of.

Ketika kata sifat terdiri dari satu atau dua suku kata, digunakan dengan menambahkan “est.”

Contoh: The Wisma Nusantara building is THE TALLEST building in Jakarta.

An elephant is THE BIGGEST animal nowadays.

Ketika kata sifat berakhir dengan “y”, maka tingkat superlative berubah menjadi “iest.”

Contoh: Today is THE HAPPIEST day for me. It’s my birthday.

I don’t know which is THE HEAVIEST metal.

Kata sifat yang lebih dari dua suku kata menggunakan “MOST.”

Ali Imron 42109958 1DC01

Sumber : http://englishtutorial.co.cc
»»  READMORE...

Jumat, 16 April 2010

tag quetion

A question tag or tag question is a grammatical structure in which a declarative statement or an imperative is turned into a question by adding an interrogative fragment (the "tag"). The term "question tag" is generally preferred by British grammarians, while their American counterparts prefer "tag question".

In most languages, tag questions are more common in colloquial spoken usage than in formal written usage. They can be an indicator of politeness, emphasis, or irony. They may suggest confidence or lack of confidence; they may be confrontational or tentative. Some examples showing the wide variety of structure possible in English are:

  • Open the window, will you?
  • She doesn't really want those apples, does she?
  • You'd better stop now, hadn't you?
  • So you thought it would be a good idea to reprogram the computer, did you?
  • It's quite an achievement, isn't it, to win a Nobel prize!
  • Oh I must, must I?
  • I just adore Beethoven, don't you?
  • I'm coming with you, all right?
  • You've been there, right?
  • Easier said than done, eh?
  • You went there, no?

Some languages have a fixed phrase for the tag question, such as Russian не правда ли? (not true?), French n'est-ce pas? ("is it not?") and German (known as "Refrainfrage") such as "nicht wahr?", "ne?", "gell?", or "oder?" . Some languages (notably English and the Celtic languages) construct their question tags to match the preceding clause for every sentence, and are therefore quite variable: you've been here before, haven't you? You didn't buy it, did you etc.

Care should be taken by the confident speaker to make certain that any tag questions are not mistaken for a leading question.

Tag questions in English

English tag questions, when they have the grammatical form of a question, are atypically complex, because they vary according to four factors: the choice of auxiliary, the negation, the intonation pattern and the emphasis.

Auxiliary

The English tag question is made up of an auxiliary verb and a pronoun. The auxiliary has to agree with the tense, aspect and modality of the verb in the preceding sentence. If the verb is in the perfect tense, for example, the tag question uses has or have; if the verb is in a present progressive form, the tag is formed with am, are, is; if the verb is in a tense which does not normally use an auxiliary, like the present simple, the auxiliary is taken from the emphatic do form; and if the sentence has a modal auxiliary, this is echoed in the tag:

  • He's read this book, hasn't he?
  • He read this book, didn't he?
  • He's reading this book, isn't he?
  • He reads a lot of books, doesn't he?
  • He'll read this book, won't he?
  • He should read this book, shouldn't he?
  • He can read this book, can't he?

A special case occurs when the main verb is to be in a simple tense. Here the tag question repeats the main verb, not an auxiliary:

  • This is a book, isn't it?

(Not doesn't it?, as the normal rules for present simple would suggest.)

If the main verb is to have, either solution is possible:

  • He has a book, hasn't he?
  • He has a book, doesn't he?

Negation

English tag questions may contain a negation, but need not. When there is no special emphasis, the rule of thumb often applies that a positive sentence has a negative tag and vice versa:

  • She is French, isn't she?
  • She's not French, is she?

These are sometimes called "balanced tag questions". However, it has been estimated that in normal conversation, as many as 40%-50%[1] of tags break this rule. "Unbalanced tag questions" (positive to positive or negative to negative) may be used for ironic or confrontational effects:

  • Do listen, will you?
  • Oh, I'm lazy, am I?
  • Jack: I refuse to spend Sunday at your mother's house! Jill: Oh you do, do you? We'll see about that!
  • Jack: I just won't go back! Jill: Oh you won't, won't you?

Patterns of negation can show regional variations. In North East Scotland, for example, positive to positive is used when no special effect is desired:

  • This pizza's fine, is it? (standard English: This pizza's delicious, isn't it?)

Note the following variations in the negation when the auxiliary is the I form of the copula:

  • England (and America, Australia, etc.): Clever, aren't I?
  • Scotland/Northern Ireland: Clever, amn't I?
  • nonstandard dialects: Clever, ain't I?

Intonation

English tag questions can have a rising or a falling intonation pattern. This is contrasted with Polish, French or German, for example, where all tags rise. As a rule, the English rising pattern is used when soliciting information or motivating an action, that is, when some sort of response is required. Since normal English yes/no questions have rising patterns (e.g. Are you coming?), these tags make a grammatical statement into a real question:

  • You're coming, aren't you?
  • Do listen, will you?
  • Let's have a beer, shall we?

The falling pattern is used to underline a statement. The statement itself ends with a falling pattern, and the tag sounds like an echo, strengthening the pattern. Most English tag questions have this falling pattern.

  • He doesn't know what he's doing, does he?
  • This is really boring, isn't it?

Sometimes the rising tag goes with the positive to positive pattern to create a confrontational effect:

  • He was the best in the class, was he? (rising: the speaker is challenging this thesis, or perhaps expressing surprised interest)
  • He was the best in the class, wasn't he? (falling: the speaker holds this opinion)
  • Be careful, will you? (rising: expresses irritation)
  • Take care, won't you? (falling: expresses concern)

Sometimes the same words may have different patterns depending on the situation or implication.

  • You don't remember my name, do you? (rising: expresses surprise)
  • You don't remember my name, do you? (falling: expresses amusement or resignation)
  • Your name's Mary, isn't it? (rising: expresses uncertainty)
  • Your name's Mary, isn't it? (falling: expresses confidence)

It is interesting that as an all-purpose tag the London set-phrase innit (for "isn't it") is only used with falling patterns:

  • He doesn't know what he's doing, innit?
  • He was the best in the class, innit?

On the other hand, the adverbial tag questions (alright? OK? etc.) are almost always found with rising patterns. An occasional exception is surely.

Emphasis

English tag questions are normally stressed on the verb, but the stress is on the pronoun if there is a change of person.

  • I don't like peas, do you?
  • I like peas, don't you?

This is often a rising tag (especially when the tag contains no negation), or the intonation pattern may be the typically English fall-rise.

In French, this would be expressed with et toi?, which is also a kind of tag question.

Variant forms

There are a number of variant forms that exist in particular dialects of English. These are generally invariant, regardless of verb, person or negativity.

The tag right? is essentially equivalent to the Spanish ¿verdad?. It is common in a number of dialects across the UK and US.

The tag eh? is of Scottish origin, and can be heard across much of Scotland, New Zealand, Canada and the North-Eastern United States. In Central Scotland (in and around Stirling and Falkirk), this exists in the form eh no? which is again invariant.

[edit] False tag in Welsh English

It is often erroneously assumed that Welsh speakers of English use a tag question to make an emphatic statement, eg: Lovely day, isn't it?

However, this is instead a cleft sentence of the form: Lovely day, is in it.

This has its roots in the Welsh language, and this type of cleft features in all extant Celtic languages. The lack of verb at the start of this construction coupled with the lack of rising intonation mark this as distinct from tag questions, which are used in Welsh English in the same manner as the majority of the UK.

Tag questions in the Celtic languages

Like English, the Celtic languages form tag questions by echoing the verb of the main sentence. The Goidelic languages, however, make little or no use of auxiliary verbs, so that it is generally the main verb itself which reappears in the tag. Some examples from Scottish Gaelic:

  • Is toil leat fìon, nach toil? - You like wine, don't you?
  • Tha i breagha an diugh, nach eil? - It's nice today, isn't it?
  • Chunnaic mi e, nach fhaca? - I saw him, didn't I?

(Here, eil and fhaca are dependent forms of the irregular verbs tha and chunnaic.)

In Welsh, a special particle is used to mark tag questions, which are then followed by the inflected form of a verb. With the auxiliary bod, it is the inflected form of bod that is used:

  • Mae hi'n bwrw glaw heddiw, on'd ydy? - It's raining today, isn't it?

With inflected non-preterite forms, the inflected form of the verb is used:

  • Doi di yfory, on' doi? - You'll come tomorrow, won't you?

With preterite and perfect forms, the invariable do (also the affirmative answer to these questions) is used:

  • Canodd y bobl, on' do? - The people sang, didn't they?
  • Mae hi wedi ei weld o, on'do? - She's seen him, hasn't she?

When a non-verbal element is being questioned, the question particle ai is used:

  • Mr Jones, on'dai? - Mr Jones, isn't it?
http://en.wikipedia.org/wiki/Tag_question
»»  READMORE...

THE MODAL AUXILIARY

The modal auxiliary verbs adalah kata-kata seperti can, will, shall, may, might, should, ought to, must, could yang digunakan bersama dengan kata kerja dan ditempatkan di depan subyek.

 The Modal auxiliary verb dan kata kerja yang mengikutinya tidak mengalami perubahan untuk orang dan jumlah
 The modal auxiliary verb ditempatkan segera sesudah subyek kalimat.

FORM: SUBJECT + THE MODAL AUXILIARY + INFINITIVE

(Positive) They can do it

(Negative) They can not do it
(Questions) Can they do it:
Short Answer Yes, they can/not, they can’t

Bentuk dan arti dari the modal auxiliary verbs:

1. Will (Future)
• They will come here on time

2. Could (ability in the past, possibility)
• She could climb when she wa still young. (ability in the past)
• She could come in a minute. (possibility)

3. Can (ability, permission)
• He can play the pino. (ability)
• They can play football here. (Permission)

4. May (Pemission, possibility)
• The children may play here. (permission)
• He may get a raise. (possibility)

5. Might (Possibility)
• He might get a rise in his salary. (possibility)

6. Should/ought to (obligation, desirability)
• Students ought to/should study regularly. (obligation)
• You ought not to/shouldn’t drink and drive. (desirability)

7. Must (conclusion, probability, necessity)
• He must be twenty years old. (conclusion, probability)
• You must be hungry. (conclusion, probability)
• You must study tonight.

EXERCISE:
Tambahlan to dimana perlu, Jika to tidak diperlukan, tulislah  dibagian yang kosong.
1. I have ... go down tomorrow.
2. Tom can ... play soccer.
3. Could you please ... open the window?
4. The students must ... learn all of the irregular verbs.
5. Sally has ... do her history.
6. I think you should ... take better care of yourself.
7. I ought ... go to the office this afternoon.
8. Would you ... speak more slowly, please?
9. We may ... go to Argentina for our vacation.
10. Will you please ... mail this letter for me?

Lengkapi kalimat dengan can dan can’t
1. A cat ... climb trees, but it ... fly
2. A fish ... walk, but it ... swim
3. A dog ... bark, but it ... sing
4. You ... buy stamps at the post office, but you ... buy shoes there.
5. A tiny baby ... cry, but it ... talk
6. I ... write with a pen, but I ... write with a paper clip
7. I ... read book by noonlight, but I ... read in sunlight.
8. Trees ... produce oxygen, but rocks ... .
9. Fish ... live in air, but they ... live in water.
10. You ... store water in a glass jar, but you ... store it in a paper bag.

http://englishcreation.blogspot.com/2009/06/modal-auxiliary-verbs.html
»»  READMORE...