Jump to content
ViCaDyLa 4EveR

Coding Yg Simple N Best Utk C++

Recommended Posts

akum n hello..

sy student programming.. diz sem blajar c++.. just nk tanya korang ler..sape ader coding c++ yg simple n best?? share la ek..

berguna utk pembelajaran tambahan sy...

ilmu utk dikongsi bukan utk disembunyi.... =)

terima kasih..

Share this post


Link to post
Share on other sites

#include <iostream>

int main()

{

std::cout << "Hello, world!\n";

}

nilah coding paling simple yg aku tau......

Share this post


Link to post
Share on other sites

#include <iostream>

int main()

{

std::cout << "Hello, world!\n";

}

nilah coding paling simple yg aku tau......

kalau coding nih,sy pun dh blajar masa intro c++.. =(

pape pun thanks.. anything else??

Edited by ViCaDyLa ADiLa

Share this post


Link to post
Share on other sites

#include<iostream.h>

int main()

{

int work;

cout<<"enter a value for hours works:";

cin>>work;

if(work<=40)

{

cout<<"\nregular";

cout<<endl;

}

else

{

cout<<"\novertime";

cout<<endl;

}

cout<<endl;

return 0;

}

ni lah yang aku buat dan belajar......

harap ni leh membantu

Share this post


Link to post
Share on other sites

aku tak paham... apa requirement dia sebenarnya? coding simple dan best?

boleh tolong terangkan apa yang ko maksudkan simple dan apa yang ko maksudkan best

sebelum ko kata aku macam-macam, aku punya pemahaman setakat ni, ko nak source code C++ yang simple means hanya beberapa line of code aje kot?

dan yang ko maksudkan best tu boleh outputkan sesuatu yang seems complex la kot?

betul ke mcm tu? boleh tolong terangkan... kalo ko boleh bagi contoh pun bagus gak...

Share this post


Link to post
Share on other sites

buat jam..

#include<iostream>
using namespace std;

void status(int a){
    if (a%2==0)cout<<" AM";
    else cout<<" PM";
}

int main(){
    int stat=1;
    int a,b,c,d;
    while(a){
    for(a=1;a<=12;a++){
        for(b=0;b<=59;b++){
            for(c=0;c<=59;c++){
                for(d=0;d<=59;d++){
                    if(a<10)cout<<"0";
                    cout<<a<<".";
                    if(b<10)cout<<"0";
                    cout<<b<<".";
                    if(c<10)cout<<"0";
                    cout<<c<<":";
                    if(d<10)cout<<"0";
                    cout<<d;
                    if(a==12 && b==0)stat++;
                                                                                status(stat);
                    system("CLS");
                }
            }
        }
    }
}
return 0;
}

Share this post


Link to post
Share on other sites

buat jam..

#include<iostream>
using namespace std;

void status(int a){
    if (a%2==0)cout<<" AM";
    else cout<<" PM";
}

int main(){
    int stat=1;
    int a,b,c,d;
    while(a){
    for(a=1;a<=12;a++){
        for(b=0;b<=59;b++){
            for(c=0;c<=59;c++){
                for(d=0;d<=59;d++){
                    if(a<10)cout<<"0";
                    cout<<a<<".";
                    if(b<10)cout<<"0";
                    cout<<b<<".";
                    if(c<10)cout<<"0";
                    cout<<c<<":";
                    if(d<10)cout<<"0";
                    cout<<d;
                    if(a==12 && b==0)stat++;
                                                                                status(stat);
                    system("CLS");
                }
            }
        }
    }
}
return 0;
}

coding ni ok gak.....

leh wat jam detik utk lumba lari....hahaha

emm leh gtau, coding camni blaja peringkat maner?

diploma ke degree?

Share this post


Link to post
Share on other sites

bagi aku, kalau nak coding, peringkat ijazah atau diploma tu bukan perkara penting, yang penting kemahuan untuk pandai tu ada.. ;)

coding jam tu mohdadli yang yang 'cabar' untuk buat dalam thread "Belajar c++ sampai terer~!!".. :)

Share this post


Link to post
Share on other sites

aku pon ada gak blaja benda ni tp aku kureng faham sangat lah... ada membe aku wat coding C++ ni utk running software lagi tuh...

Share this post


Link to post
Share on other sites

bagi aku, kalau nak coding, peringkat ijazah atau diploma tu bukan perkara penting, yang penting kemahuan untuk pandai tu ada.. wink.gif

coding jam tu mohdadli yang yang 'cabar' untuk buat dalam thread "Belajar c++ sampai terer~!!".. smile.gif

oo kire macam

result=minat + kena cabar;

baru leh buat......:lol:hhehe

aku pon ada gak blaja benda ni tp aku kureng faham sangat lah... ada membe aku wat coding C++ ni utk running software lagi tuh...

mmber ko wat software ape?

Edited by dragonfirebreath

Share this post


Link to post
Share on other sites

Aku kat kolej matrikulasi pun blaja programming.

kami punya exercise tiap2 minggu buat application yg simple cam pertukaran unit dlm berat, panjang, suhu.

app. utk kira body mass index pun kena ajar ^_^

Share this post


Link to post
Share on other sites

aju rasa sblm ko post topik ni, mcm yg apogee ckp. ko kene tau jenis coding pe yg ko nk? apa yg ko maksudkan dengan simple? n apa yg ko maksudkan dengan best? cuba terangkan lu pada kitorg...

cth, kalo ko nk coding utk database, ckp jela utk database..

kan senang...

org lain pun senang nak bg contoh.

aku ada coding yg digunakan dlm atm machine. tp xleh bg arrr.. huhuhu...

wat sendiri pun leh kot.. huhuhu...

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...