Program mencari karakter angka dengan Array dimensi satu

on

maaf sebelumnya klo program ini terlalu singkat,, mungkin bisa dikembangkan sendiri.
berikut ini saya akan share program mencari nilai karakter dengan array dimensi satu..
langsung aja berikut screenshootnya:


Berikut Scriptnya:
//program by: Hand Excel
#include<conio.h>
#include<stdio.h>
main()
{
int x,i,k,a,n;
int l[10];
printf(“masukkan jumlah data:”);
scanf(“%d”,&n);
for(a=1;a<=n;a++)
{
printf(“Masukkan data ke-%d:”,a);
scanf(“%d”,&l[a]);
}
printf(“\nData yang dicari = “);
scanf(“%d”,&x);
k=0;
for(i=1;i<=10;i++)
{
if(l[i]==x)
{
printf(“Data %d ditemukan\n”,x);
k++;
}
}
if(k==0)
{
printf(“Data tidak ditemukan\n”);
}
getch();
return 0;
}

Semoga bermanfaat…🙂

3 Comments Add yours

  1. Virgil mengatakan:

    I’m not sure where you’re getting your info, but great topic.

    I needs to spend some time learning much more
    or understanding more. Thanks for magnificent information I was
    looking for this info for my mission.

  2. You’re so cool! I do not think I have read through anything like that before.
    So wonderful to discover another person with a few original thoughts
    on this issue. Seriously.. thank you for starting this up.

    This site is something that is required on the internet, someone with
    a little originality!

  3. Eventim discount code mengatakan:

    I have read a few good stuff here. Definitely price bookmarking for revisiting.
    I wonder how so much effort you set to make any such
    fantastic informative site.

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s