ViCaDyLa 4EveR 0 Report post Posted February 3, 2007 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.. Quote Share this post Link to post Share on other sites
powerabu 0 Report post Posted February 3, 2007 #include <iostream>int main(){ std::cout << "Hello, world!\n";}nilah coding paling simple yg aku tau...... Quote Share this post Link to post Share on other sites
ViCaDyLa 4EveR 0 Report post Posted February 4, 2007 (edited) #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 February 4, 2007 by ViCaDyLa ADiLa Quote Share this post Link to post Share on other sites
mindeye 0 Report post Posted February 15, 2007 #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 Quote Share this post Link to post Share on other sites
f a 0 Report post Posted February 15, 2007 kalo ade coding yang kompleks tapi best leh tak? Quote Share this post Link to post Share on other sites
ApOgEE 1 Report post Posted February 15, 2007 aku tak paham... apa requirement dia sebenarnya? coding simple dan best?boleh tolong terangkan apa yang ko maksudkan simple dan apa yang ko maksudkan bestsebelum 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... Quote Share this post Link to post Share on other sites
ApoNie 0 Report post Posted February 15, 2007 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; } Quote Share this post Link to post Share on other sites
dragonfirebreath 0 Report post Posted February 16, 2007 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....hahahaemm leh gtau, coding camni blaja peringkat maner?diploma ke degree? Quote Share this post Link to post Share on other sites
ApoNie 0 Report post Posted February 16, 2007 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~!!".. Quote Share this post Link to post Share on other sites
ApoKalypse 1 Report post Posted February 16, 2007 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... Quote Share this post Link to post Share on other sites
dragonfirebreath 0 Report post Posted February 16, 2007 (edited) bagi aku, kalau nak coding, peringkat ijazah atau diploma tu bukan perkara penting, yang penting kemahuan untuk pandai tu ada.. wink.gifcoding jam tu mohdadli yang yang 'cabar' untuk buat dalam thread "Belajar c++ sampai terer~!!".. smile.gifoo kire macamresult=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 February 16, 2007 by dragonfirebreath Quote Share this post Link to post Share on other sites
Fou_Lu 0 Report post Posted February 18, 2007 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 Quote Share this post Link to post Share on other sites
shinobazu 0 Report post Posted March 17, 2007 wei..ada sesapa yg pernah buat coding tuk "sistem penyewaan kereta" guna data structure tak??bg la kalu ada...kalau takda coding bg pseudocode pn jadi la.... Quote Share this post Link to post Share on other sites
Adil 0 Report post Posted March 17, 2007 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... Quote Share this post Link to post Share on other sites