Minggu, 17 Januari 2010

Procedure Rata-rta dan Tukar Bilangan di C++

Procedure Rata-rata
void rata2(int data[],int jum){
int sum=data[0];
for (int i=1; i sum+=data[i];
}
cout<<"\nRata-rata = "<<(float) sum/jum;
}


procedure tukar nilai bilangan
void tukar(int *a,int *b){
int temp;
temp = *a;
*a = *b;
*b = temp;
}

0 comments:

Posting Komentar

Twitter Delicious Facebook Digg Stumbleupon Favorites More

Enter your email address to subscribe:

Delivered by FeedBurner

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | SharePoint Demo