Type the Question

Saturday, February 16, 2019

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.

No comments:

Post a Comment

Question Name:TOWER OF HANOI

#include < bits / stdc ++. h > #define lli long long using namespace std ; lli dp [ 202 ]; int main () { int t , n ; ...