Question Name:Books



#include <stdio.h>
int main()
{

int a[10],i,b,k,count=0;
scanf("%d",&b);
for(i=0;i<b;i++)
{
scanf("%d",&a[i]);
}
scanf("%d",&k);
for(i=0;i<b;i++)
{
if(k==a[i])
{
count++;
}
}
if(count==1)
{
printf("Book Available");
}
else{
printf("Book is not available");
} //navnit
return 0;
}

Problem Description

Books price list of [195,200,175,255,105] is sorted. Shop manager wants to check whether book of Rs 195 is available.

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.

Powered By
100% Free SEO Tools - Tool Kits PRO