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
kotykmax [81]
2 years ago
5

Please help me to creat flow chart tq​

Computers and Technology
1 answer:
Marina CMI [18]2 years ago
4 0

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

You might be interested in
Many mobile computers and mobile devices use LCD monitors. What does LCD stand for?
erica [24]
Liquid crystal display
4 0
3 years ago
What option is used to combine several objects so that they can be treated as a single unit
elixir [45]
Im gonna hope this is a coding question.
It's parent (unit) and make children (objects)

If it's word/excel give me the multiple choice answers please.
6 0
3 years ago
I need help on this question , what is web feed ?
Whitepunk [10]

Answer:

C. a data format delivering web content that is updated frequently

Explanation:

8 0
3 years ago
Read 2 more answers
How do you protect the server from modification by non-root users?
Elis [28]

Answer:

We can protect the server from the modification by using the non root users in many ways as follows:

  • By modifying the PHP settings in the server and by using the configured file as, the configuration of the file is basically depend upon the linux and the PHP script.
  • By disabling the URL from the function of file handling that basically accept the local file as the parameters but it also accept the URL.  It can even now get to outer destinations by utilizing fsockopen or any of the CURL capacities.
  • The safe mode  of PHP is presumably probably the best alternative to secure your server however it very well may be prohibitive. Whenever initiated, experimental mode averts access to records not claimed by Apache and access to condition factors and execution of double projects are likewise debilitated.

4 0
3 years ago
PLEASE HELP ITS CODING AND I INCLUDED A SCREENSHOT OF WHAT TO DO
madam [21]

Answer:

I need to have better photos in order to assist you...

Explanation:

I will attempt to get back with you if you can provide more clearer photos.

6 0
3 years ago
Read 2 more answers
Other questions:
  • How do you turn on the Track Changes feature in a spreadsheet?
    8·1 answer
  • Write a program in C which will open a text file named Story.txt. You can create the file using any text editor like notepad etc
    9·1 answer
  • How many bits are required to address a 1mx8 main memory if main memory is byte addressable?
    6·1 answer
  • Which of the following might indicate a source on the internet is NOT reliable?
    6·1 answer
  • Can someone please help me with the three questions please?
    6·1 answer
  • a solid state drive is a removable flash memory device that you insert and remove from a slot in a computer, mobile device, or c
    5·1 answer
  • Advertising managers work on websites used in __________?
    13·2 answers
  • Which items in the list below are viruses. Click in the box to select your answer(s).
    8·1 answer
  • Is nanotechnology is good or bad? and why?
    5·2 answers
  • Identify the type of software that should be in main memory in order to use the keyboard? *
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!