bilkecil.cpp

Bookmark and Share
#include<iostream.h>

main()

{

int i,n,x;

double A[100];

cout<<"program bilangan terkecil"<<endl;

cout<<"masukkan banyaknya data : ";cin>>n;

for (i=0;i<n;i++)

{cout<<"masukkan data ke-"<<i+1<<" : ";cin>>A[i];}

cout<<"bilangan terkecil adalah ";

x=A[0];

for (i=0;i<n;i++)

{if (A[i]<=x)

x=A[i];

}

cout<<x;

}



{ 0 komentar... Views All / Send Comment! }

Posting Komentar

Powered By Blogger