Data -Structure Hash Division Method (Character of a String Input )
----------------------------------------------------------------------------
---------------------------------------------------------------------------
#include<stdio.h>
void main()
{
int i,h,k=0;
char a[5];
printf("Give the character of a String:\n");
for(i=0;i<5;i++)
{
scanf("%c",&a[i]);
}
for(i=0;i<5;i++)
{
k=k+a[i];
}
h=k%5;
printf("Hash index=%d",h);
}
(By:shahimtiyaj)
0 comments:
একটি মন্তব্য পোস্ট করুন