WFandella
Monday, December 24, 2012
Mencari Nilai Terkecil Array (C++)
#include<stdio.h>
#include<conio.h>
int main(void){
int nilai[3];
nilai[0]=12;
nilai[1]=45;
nilai[2]=90;
nilai[3]=41;
int min;
min=90;
for (int i=0;i<=3;i++)
{
if (nilai[i]<min)
{
min=nilai[i];
}
}
printf("Nilai Terkecil Adalah %d",min);
return 0;
}
Silahkan di coba... ^^
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Link
Contoh Program Menu Gabungan antara Queue & Sorting C++ (Struktur Data)
Mencari Nilai Terkecil Array (C++)
#include<stdio.h> #include<conio.h> int main(void){ int nilai[3];
Contoh Program Linked List insert Kanan (Struktur Data)
#include<stdio.h> #include<stdlib.h> #include<conio.h> void BUAT_SIMPUL(int X); void AWAL(); void CETAK(); void Ins...
No comments:
Post a Comment