Tugas Kuliah (Program Java)

Gak kerasa gue udah semester 3 lagi. Dan semester ini tugas makin-makin nambah banyak aja, sampe ga ada waktu luang *apa iya?*
Gue mau share salah satu tugas gue dari mata kuliah pemrograman java.
Tugasnya kali ini adalah bikin program untuk menghitung pecahan uang.

Dan langsung aja dibawah ini adalah source codenya :
-----------------------------------------------------

import java.util.*;

//Tugas Muhammad Arif AH (109093000154)

public class tugaspraktekjava1 {
public static void main (String args[]){


long pecahan, uang;

System.out.print(".: Program Penghitung Pecahan Uang:. \n");
System.out.print("\nMasukan sejumlah uang = ");
Scanner obj = new Scanner(System.in);
uang = obj.nextLong();

if (uang <> 100000){
System.out.println("Maaf, nominal yang paling besar adalah 100000 rupiah saja");
}


else{

if (uang >= 100000){
pecahan = uang / 100000;
System.out.println("Pecahan 100000 = "+pecahan);
}
uang = uang % 100000;

if ((uang >= 50000) && (uang <100000)){ pecahan = uang / 50000; System.out.println("Pecahan 50000 = "+pecahan); } uang = uang % 50000; if ((uang >= 20000) && (uang <50000)){ pecahan = uang / 20000; System.out.println("Pecahan 20000 = "+pecahan); } uang = uang % 20000; if ((uang >= 10000) && (uang <20000)){ pecahan = uang / 10000; System.out.println("Pecahan 10000 = "+pecahan); } uang = uang % 10000; if ((uang >= 5000) && (uang <10000)){ pecahan = uang / 5000; System.out.println("Pecahan 5000 = "+pecahan); } uang = uang % 5000; if ((uang >= 2000) && (uang <5000)) { pecahan = uang / 2000; System.out.println("Pecahan 2000 = "+pecahan); } uang = uang % 2000; if ((uang >= 1000) && (uang <2000)) { pecahan = uang / 1000; System.out.println("Pecahan 1000 = "+pecahan); } uang = uang % 1000; if ((uang >= 500) && (uang <1000)) { pecahan = uang / 500; System.out.println("Pecahan 500 = "+pecahan); } uang = uang % 500; if ((uang >= 200) && (uang <500)){ pecahan = uang / 200; System.out.println ("Pecahan 200 = "+pecahan); } uang = uang % 200; if ((uang >= 100) && (uang <200)){ pecahan = uang / 100; System.out.println ("Pecahan 100 = "+pecahan); } uang = uang % 100; if ((uang >= 50) && (uang <100)){ pecahan = uang / 50; System.out.println ("Pecahan 50 = "+pecahan); } uang = uang % 50; if ((uang > 0) && (uang <50)){ pecahan = uang ; if (pecahan<10) System.out.println ("Pecahan "+pecahan+ " abaikan saja"); else if (pecahan>=10)

System.out.println ("Pecahan "+pecahan+ " abaikan saja");
}
}
}
}
}


-----------------------------------------
Oke guys, semoga bermanfaat buat memenuhi tugas dari dosen. Hehe
Dan gak lupa gue minta koreksinya kalo masih ada yang salah. Thankyu :)

Eminem - Love The Way You Lie ft Rihanna

Huhuuyy, eminem ngeluarin hit teranyarnya yang berjudul “Love The Way You Lie”.
Lagu ini featuring Rihanna, yang suaranya ga diragukan lagi. Beuh makin mantep dah tuh! haha

Wara-wiri dimana-mana orang-orang pada nyetel lagu ini, padahal mah ngarti juga kaga.
Kalo masih pensaran ama liriknya dan lo ga cuma was..wes..wos doangg... mending ndiri tengok liriknya dibawah ini gan, kalo bisa lo nyanyiin bareng dah tuh ama temen-temen lo! haha


Oke kita cekidot gan!!
----------------------------------------------------------------

Eminem - Love The Way You Lie ft Rihanna


Reff

Just gonna stand there
And watch me burn
But that's alright
Because I like
The way it hurts

Just gonna stand there
And hear me cry
But that's alright
Because I love
The way you lie

I love the way you lie
I love the way you lie

I can't tell you what it really is
I can only tell you what it feels like
And right now there's a steel knife
In my windpipe
I can't breathe
But I still fight
While I can fight
As long as the wrong feels right
It's like I'm in flight
High of a love
Drunk from the hate
It's like I'm huffing paint
And I love it the more that I suffer
I sufficate
And right before im about to drown
She resuscitates me
She fucking hates me
And I love it
Wait
Where you going
I'm leaving you
No you ain't
Come back
We're running right back
Here we go again
It's so insane
Cause when it's going good
It's going great
I'm Superman
With the wind in his bag
She's Lois Lane
But when it's bad
It's awful
I feel so ashamed
I snap
Who's that dude
I don't even know his name
I laid hands on her
I'll never stoop so low again
I guess I don't know my own strength

Back to Reff

You ever love somebody so much
You can barely breathe
When you're with them
You meet
And neither one of you
Even know what hit 'em
Got that warm fuzzy feeling
Yeah them chills
Used to get 'em
Now you're getting fucking sick
Of looking at 'em
You swore you've never hit 'em
Never do nothing to hurt 'em
Now you're in each other's face
Spewing venom
And these words
When you spit 'em
You push
Pull each other's hair
Scratch, claw, bit 'em
Throw 'em down

Pin 'em
So lost in the moments
When you're in 'em
It's the rage that took over
It controls you both
So they say it's best
To go your separate ways
Guess that they don't know ya
Cause today
That was yesterday
Yesterday is over
It's a different day
Sound like broken records
Playin' over
But you promised her
Next time you'll show restraint
You don't get another chance
Life is no Nintendo game
But you lied again
Now you get to watch her leave
Out the window
Guess that's why they call it window pane

Back to Reff

Now I know we said things
Did things
That we didn't mean
And we fall back
Into the same patterns
Same routine
But your temper's just as bad
As mine is
You're the same as me
But when it comes to love
You're just as blinded
Baby please come back
It wasn't you
Baby it was me
Maybe our relationship
Isn't as crazy as it seems
Maybe that's what happens
When a tornado meets a volcano
All I know is
I love you too much
To walk away though
Come inside
Pick up your bags off the sidewalk
Don't you hear sincerity
In my voice when I talk
Told you this is my fault
Look me in the eyeball
Next time I'm pissed
I'll aim my fist
At the dry wall
Next time
There will be no next time
I apologize
Even though I know it's lies
I'm tired of the games
I just want her back
I know I'm a liar
If she ever tries to fucking leave again
I'mma tie her to the bed
And set the house on fire

Back to Reff

-----------------------------------------------------------------

Ini vidionya gan. Ajib!


Bondan - Not With Me



Yeaaahh, singel teranyar dari Bondan (bondan prakoso bukan pa bondan kuliner :p)

Pertama kali gue dengerin kirain yang bawain band luar, eh ternyata mas Bondan toh. Hoalaahh

Liriknya menurut gue lumayan dalem sih, gue banget deh! Apalagi pas dibagian reff nya. Beuh!! << *sok disambung-sambungin*

------------------------------------------

Bondan - Not With Me

I’m waking up from my summer dreams again
try to thinking if you’re alright
then i’m shattered by the shadows of your eyes
knowing you’re still here by my side

Reff :
I can see you if you’re not with me
I can say to my self if you’re okay
I can feel you if you’re not with me
I can reach you my self, you show me the way

Life was never be so easy as it seems
’till you come and bring your love inside
no matter space and distance make it look so far
still i know you’re still here by my side

Back to Reff :

Yeah… you’re made me so alive,
you give the best for me…
love and fantasy
yeah…
and i never feel so lonely,
coz you’re always here with me… yeah…
always here with me

Back to Reff :

I’m waking up from my summer dreams again
try to thinking if you’re alright
then i’m shattered by the shadows of your eyes
knowing you’re still here by my side

The Script - The Man Who Can't Be Moved


Gue belakangan ini lagi suka banget nih ama ini lagu. Mantep banget!

Padahal udah dari kapan tau nih lagu rilis.. haha

Dalem lagu ini mengisahkan seseorang lelaki bisa dibilang ‘batu’ karena dia ga mau berpindah hati buat mencintai cewek lain. Gue pernah tuh kayak gitu, tapi itu dulu.

Band nya namanya The Script, Gue lebih mikir kayak script java ato VB gitu. Haha bukan yah?!

Oke dari pada penasaran pantengin aja deh liriknya!
----------------------------------------------

The Script - The Man Who Can't Be Moved

Going back to the corner where I first saw you
Gonna camp in my sleeping bag I'm not gonna move
Got some words on cardboard, got your picture in my hand
Saying, "If you see this girl can you tell her where I am?"

Some try to hand me money, they don't understand
I'm not broke I'm just a broken hearted man
I know it makes no sense but what else can I do
How can I move on when I'm still in love with you

Reff
'cause if one day you wake up and find that you're missing me
And your heart starts to wonder where on this earth I could be
Thinkin maybe you'll come back here to the place that we'd meet
And you'll see me waiting for you on our corner of the street
So I'm not moving, I'm not moving

Policeman says, "Son you can't stay here"
I said, "There's someone I'm waiting for if it's a day, a month, a year"
Gotta stand my ground even if it rains or snows
If she changes her mind this is the first place she will go

Back to Reff

People talk about the guy that's waiting on a girl
There are no holes in his shoes but a big hole in his world

Maybe I'll get famous as the man who can't be moved
Maybe you wont mean to but you'll see me on the news
And you'll come running to the corner
'cause you'll know it's just for you
I'm the man who can't be moved

[Chorus 2x]

Going back to the corner where I first saw you
Gonna camp in my sleeping bag I'm not gonna move