1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
abruzzese [7]
2 years ago
7

Complete the second clause of the following Prolog program for member/2 where member(X, Y) checks whether X is an element (a mem

ber) of a list Y. member(X,[X|R]). member(X,[Y|R]) :- ____________.A. member(X,R).
B. member(X,Y).
C. member(_,R).
D. member(Y,R).
E. member(X,Y).
Computers and Technology
1 answer:
Nadusha1986 [10]2 years ago
4 0

Answer:

The answer is "Option A"

Explanation:

In the given program code, two-member "X, Y" is used, in which X is an element of the list and Y is the list. In this another variable R declares, that store a number for the match, in this question choice "A" is correct because it uses an element and variable "R" for check and wrong choices can be described as follows:

  • In option B, in this two-parameter is used, in which one is an element and one is the list, that's why it is incorrect.
  • In option C, It is wrong because there is no underscore variable.
  • Option D and Option E both were wrong because in this list is passed as the parameter.
You might be interested in
Please someone helppppppp
Cerrena [4.2K]

Answer : communicate is the answer.

5 0
2 years ago
Read 2 more answers
unittttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt
alukav5142 [94]
What the hell is the point of this, just to waist people's time?
5 0
3 years ago
What are the outputs of these please help
larisa [96]

Answer:

monkey know monkey not tell

Explanation:

4 0
2 years ago
Read 2 more answers
What isthe history of technology from the 1980s to now and how is it used in classrooms?.?. PLEASE HELP
AlladinOne [14]

Answer:

Technology has a prestigious history. It took years for the technology to come up and prove its essence.

The Internet, World Wide Web, the development of websites, the introduction of Wikipedia and its evolution marks the golden period on 1980s which was followed by launch of certain search engines like google, bing, duckduck go and may more which made the surfing more easy and fun. Then further the launch of android phones and iPhones  brought up another revolution in technology.

Nowadays, technology finds its use almost everywhere. Talking about the classrooms, students resort to internet for exploring studies, topics, projects and much more. The use of Wikipedia has reached a whole new level. Teachers tend to provide assignments over the internet only in order to increase the exposure and reduce the use of paper which works in the collective good of both internet and nature!

3 0
3 years ago
Please help me to creat flow chart tq​
Marina CMI [18]

Using the knowledge in computational language in C it is possible to write a code that uses a class called "books". Data members of this class are author, title, price, publisher and stock position.

<h3>Writting the code in C++</h3>

<em>#include<iostream.h></em>

<em>#include<conio.h></em>

<em>#include<stdio.h></em>

<em>#include<string.h></em>

<em />

<em>//declaration of class books</em>

<em>class books</em>

<em>{</em>

<em />

<em>//data members of books class</em>

<em>public:</em>

<em>char author[20];</em>

<em>char title[20];</em>

<em>char publisher[50];</em>

<em>int price;</em>

<em>int copies;</em>

<em>int stock;</em>

<em />

<em>//setData() function to set data of books</em>

<em>void setData()</em>

<em>{</em>

<em>cout<<"\nEnter the following details:\nAuthor's Name:";</em>

<em>gets(author);</em>

<em>cout<<"\nTitle :";</em>

<em>gets(title);</em>

<em>cout<<"\nPublisher :";</em>

<em>gets(publisher);</em>

<em>cout<<"\nPrice :";</em>

<em>cin>>price;</em>

<em>cout<<"\nNumber of copies:";</em>

<em>cin>>copies;</em>

<em>stock=1;</em>

<em>}</em>

<em />

<em>//check() function to check if a book is available or not</em>

<em>void check()</em>

<em>{</em>

<em>char t[20],aut[20];</em>

<em>int cop;</em>

<em>cout<<"\nEnter the following details to search for book:\n";</em>

<em>cout<<"\nTitle of the book:";</em>

<em>gets(t);</em>

<em>cout<<"\nEnter Author's Name :";</em>

<em>gets(aut);</em>

<em>cout<<"\nNumber of copies:";</em>

<em>cin>>cop;</em>

<em>if(strcmp(t,title) & strcmp(aut,author) & (cop<=copies))</em>

<em>{</em>

<em>cout<<"\nBook is availabe in store\nPrice = "<<cop*price;</em>

<em>copies-=cop;</em>

<em>}</em>

<em>else</em>

<em>{</em>

<em>cout<<"Not available";</em>

<em>}</em>

<em>}</em>

<em>};</em>

<em />

<em />

<em>void main()</em>

<em>{</em>

<em>clrscr();</em>

<em>books bk;</em>

<em>bk.setData();</em>

<em>bk.check();</em>

<em>getch();</em>

<em>}</em>

See more about C code at brainly.com/question/17544466

#SPJ1

4 0
1 year ago
Other questions:
  • In the context of an expert system, a _____ works with the knowledge base management system to ensure that the knowledge base is
    13·1 answer
  • Where should you look to find contact information about a company? I. on the company website II. at your local library III. in t
    11·2 answers
  • 6. A distribution consists of three components with frequencies 200, 250 and 300 having means
    14·1 answer
  • User Interface Design ensures that the interface has elements that are easy to ________________. (Choose all that apply)
    10·2 answers
  • 6.16 LAB: Find largest number (EO) Write a method, findMax(), that repeatedly reads in integers until a negative integer is read
    9·1 answer
  • I have a computer teacher who made me lose points in an assignment and saying that the reference page should be on a separate pa
    14·1 answer
  • Which line correctly starts the definition of a class named "team"?
    7·1 answer
  • A radio and communications security repairer is responsible for both radio and satellite communication systems.
    6·2 answers
  • Explain how power surges can affect computers and how this problem can be minimised or removed<br>​
    9·1 answer
  • What does c++ programming mean?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!