Results 1 to 7 of 7

Thread: [ASK]About C++

http://idgs.in/715077
  1. #1

    Join Date
    Sep 2013
    Location
    ►►►Elysium◄◄◄
    Posts
    5,673
    Points
    30,608.61
    Thanks: 120 / 134 / 117

    Default [ASK]About C++

    hello guys,
    gw mau nanya nih

    gw mendapat tugas membuat looping deret c++
    dan gw memilih deret berpangkat
    tapi gw lupa caranya gimana.

    -

    include <iostream>
    using namespace std;

    void main()
    {
    system ("pause");
    }


    _____________________________________________

    please help me
    Last edited by Lexine; 20-09-14 at 10:59.
    Rain makes everything better

    ♎ Complain,Konfirmasi,Pertanyaan silahkan ke Lexine


    Quote Originally Posted by -HendRa- View Post
    gw okoyak jink
    Quote Originally Posted by -HendRa- View Post
    gw pake okoyak kk
    Quote Originally Posted by -HendRa- View Post
    what do you speak b!tch ?

  2. Hot Ad
  3. #2
    BoYBoY's Avatar
    Join Date
    Oct 2006
    Location
    Jakarta
    Posts
    3,085
    Points
    8,294.26
    Thanks: 1,150 / 244 / 186

    Default

    input yang lu harapkan seperti apa?
    output yg lu harapkan seperti apa?

    apakah input: 6

    maka output:
    1 4 9 16 25 36 ?

    coba lu kasih dulu hasil usaha lu sampe mana @Lexine;
    di bawah spoiler jawaban, tp gw harap lu coba2 dl sblm langsung liat

    Spoiler untuk jawaban :

    kalo iya, kira2 logic nya gini (gw lupa bahasa C++ kaya gmna)
    Code:
    input = 6
    
    for(i=1;i<=input;i++){
    print(i*i); --print deret angka hasil pangkat
    print(" "); --print spasi
    }
    Last edited by BoYBoY; 20-09-14 at 17:10.
    Click here to visit my thread :D


    "Tell me and I forget. Teach me and I remember. Involve me and I learn."
    "Never make the permanent decisions based on temporary feelings."

    Sell>Laptop Gaming High Spec +BONUS2

    15 tahun Digimon
    Drummer kece
    Street Fighter - The Assassin's Fist


  4. #3
    Vexituz's Avatar
    Join Date
    Feb 2010
    Location
    @L_NataN
    Posts
    14,318
    Points
    9,278.55
    Thanks: 455 / 609 / 433

    Default

    peljaran semester 1 gue, gue lupa bahasanya

    yg jelas langkah nya kek gini

    1. lu input angka yang mau lu pangkatin, jadiin variabel x & variable w
    2. lu input sampe pangkat berapa yang kau mau, jadiin variable y
    3. bikin variabel baru z.

    abis itu pake
    Code:
    for(z=1;z<=y;z++)
    {
    w = w * x
    cout<<"angka pangkat ke "<<z<<" adalah " w";
    }
    gitu2lah pokoknya kode nya. gw lupa juga
    Steam : Vexituz

    Tidak Melayanin Barter Cendol!!!

  5. #4

    Join Date
    Sep 2013
    Location
    ►►►Elysium◄◄◄
    Posts
    5,673
    Points
    30,608.61
    Thanks: 120 / 134 / 117

    Default

    Quote Originally Posted by BoYBoY View Post
    input yang lu harapkan seperti apa?
    output yg lu harapkan seperti apa?

    apakah input: 6

    maka output:
    1 4 9 16 25 36 ?

    coba lu kasih dulu hasil usaha lu sampe mana @Lexine;
    di bawah spoiler jawaban, tp gw harap lu coba2 dl sblm langsung liat

    Spoiler untuk jawaban :

    kalo iya, kira2 logic nya gini (gw lupa bahasa C++ kaya gmna)
    Code:
    input = 6
    
    for(i=1;i<=input;i++){
    print(i*i); --print deret angka hasil pangkat
    print(" "); --print spasi
    }
    tadinya gw mau bikin kyk gini
    masukin input tar keluar
    tp gw bener-bener lupa awkawkawkawk

    nyari-nyari petunjuk di gugle jadinya gini

    Rain makes everything better

    ♎ Complain,Konfirmasi,Pertanyaan silahkan ke Lexine


    Quote Originally Posted by -HendRa- View Post
    gw okoyak jink
    Quote Originally Posted by -HendRa- View Post
    gw pake okoyak kk
    Quote Originally Posted by -HendRa- View Post
    what do you speak b!tch ?

  6. #5
    BoYBoY's Avatar
    Join Date
    Oct 2006
    Location
    Jakarta
    Posts
    3,085
    Points
    8,294.26
    Thanks: 1,150 / 244 / 186

    Default

    hmm, jadi uda clear apa blm nih
    Click here to visit my thread :D


    "Tell me and I forget. Teach me and I remember. Involve me and I learn."
    "Never make the permanent decisions based on temporary feelings."

    Sell>Laptop Gaming High Spec +BONUS2

    15 tahun Digimon
    Drummer kece
    Street Fighter - The Assassin's Fist


  7. #6

    Join Date
    Sep 2013
    Location
    ►►►Elysium◄◄◄
    Posts
    5,673
    Points
    30,608.61
    Thanks: 120 / 134 / 117

    Default

    udah kok

    thanks thanks
    Rain makes everything better

    ♎ Complain,Konfirmasi,Pertanyaan silahkan ke Lexine


    Quote Originally Posted by -HendRa- View Post
    gw okoyak jink
    Quote Originally Posted by -HendRa- View Post
    gw pake okoyak kk
    Quote Originally Posted by -HendRa- View Post
    what do you speak b!tch ?

  8. #7
    BoYBoY's Avatar
    Join Date
    Oct 2006
    Location
    Jakarta
    Posts
    3,085
    Points
    8,294.26
    Thanks: 1,150 / 244 / 186

    Default

    sip sip.

    thanks for contributor juga
    closed dl yah

    kalo ada apa2 tanya aja
    Click here to visit my thread :D


    "Tell me and I forget. Teach me and I remember. Involve me and I learn."
    "Never make the permanent decisions based on temporary feelings."

    Sell>Laptop Gaming High Spec +BONUS2

    15 tahun Digimon
    Drummer kece
    Street Fighter - The Assassin's Fist


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •