Minggu, 11 Maret 2012

menghitung elemen array 1,3,5,4,7,2,99,16,45,67,89,45


#include <iostream.h>
void main()
{
int x[12]={1,3,5,4,7,2,99,16,45,67,89,45};
int i,jum;
jum=0;
for(i=0;i<12;i++)
{
cout<<x[i];
jum++;
}
cout<<" \n"<<endl;
cout<<"Jumlah Elememen : "<<jum;
}

Tidak ada komentar:

Posting Komentar