Ceriwis  

Go Back   Ceriwis > HOBI > Komputer & Teknologi > Programming

Programming Share, tanya jawab, saling bantu antar programmer dengan berbagai macam bahasa pemrograman.

Reply
 
Thread Tools
  #1  
Old 20th November 2011
PHPmaster PHPmaster is offline
Ceriwiser
 
Join Date: Nov 2011
Posts: 332
Rep Power: 14
PHPmaster mempunyai hidup yang Normal
Default Computer Science Things

buat mbah mbah yang jago comp. sci.



mau nanya donk dasar pemrograman banget nih:



1. apa sih return itu



(yang biasa di taro dibagian bawah function)

contoh


Code:

function halo(x)
x=x+1

return x ato return None

trus beda return x ama return None itu apa ya?



contoh lagi


Code:

// Single return at end often improves readability.
int max(int a, int b) {
int maxval;
if (a > b) {
maxval = a;
} else {
maxval = b;
}
return maxval;
}//end max

klo bentuk kyk gitu apakah ntr mesti dipanggil lagi pake fungsi output? ato langsung nongol?



jadi return semacam perintah output juga





2. Apa sih pemrograman rekursif itu? ajarin pake contoh-contoh donk



kalo ada yang jawabnya jelas ane kasi melon deh

</div>

Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


 


All times are GMT +7. The time now is 04:30 AM.


no new posts