Jump to content
Sign in to follow this  
edril

Maks And Min Guna C Programming

Recommended Posts

ph34r.gif ari 2 ade aku post soalan tentang benda yang sama cuma aku lupa nak state yang aku gunakan language c bukan c++.aku ade confuse ckt ar degan coding die.camne ek nak tentukan maks and min.Lets say akunye coding gini ar lebih kuang:

# include<stdio.h>

int i;
int num[8]

void main(){

for (i=0;i<10:i++){
printf("masukkan nilai:");
scanf("%d", num[i]);
}

}

1)aku mintak user input data tak lebih dari 10.Means indeks mula dari [0] sampai la [9] kan.Skang ni aku nak mintak tolong korang camne eh nak create satu function yang baca nilai dari setiap indeks dalam array aku,then tengok yang mana satu nilai maks and min.

2)Then lets say la aku nak buat lagi satu function yang leh delete nilai dalam arrray yang lebih besar dari nilai 7.Nak guna koding ape ek.

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...
Sign in to follow this  

×
×
  • Create New...