Write the c++ program reading from the user the information about the select book for stored in the public library. Information provided by the user should include: title, author, ISBN number, genre, publication year, number of pages and publisher. For reading these data, prepare the specialized function. Do the same for printing the information in the console. The structure should contain the union, which value (and type)will depend on the genre. For instance, in the case of the historical book, the union should return theinteger number interpreted as the century, in which the action takes place, in the case of the crime story it should be the string defining the detective solving the case, while in the case ofthe SF novel it should be the floating point number representing the distance between the location of thestory andtheEarth(in lightyears).

Answers

Answer 1

The c++ program reading from the user the information about the select book for stored in the public library.

#include<iostream>

#include<string>

What is c++ program?

C++ is a general-purpose programming language created by Bjarne Stroustrup in 1985. It is an extension of the C programming language and provides object-oriented features such as classes, inheritance, and polymorphism.

Explanation:

using namespace std;

struct book {

   string title, author, ISBN, publisher;

   int publicationYear, numberOfPages;

   //union for genre

   union {

       int century;

       string detective;

       double distance;

   } genre;

};

//function to read book information

book readBook(){

   book b;

   cout<<"Please enter the title of the book: ";

   cin>>b.title;

   cout<<"Please enter the author of the book: ";

   cin>>b.author;

   cout<<"Please enter the ISBN of the book: ";

   cin>>b.ISBN;

   cout<<"Please enter the genre of the book: ";

   string genre;

   cin>>genre;

   if(genre == "historical"){

       cout<<"Please enter the century in which the action takes place: ";

       cin>>b.genre.century;

   }

   else if (genre == "crime"){

       cout<<"Please enter the

To learn more about c++ program

https://brainly.com/question/28959658

#SPJ1


Related Questions

Implement an operator* function so that one can repeat strings a given number of times. For example,
string greeting = "hi";
string result = greeting * 3;
should set result to "hihihi".
Complete the following file:
#include
using namespace std;
=====complete from here
Use the following file:
Tester.cpp
#include
#include
using namespace std;
string operator*(string s, int n);
int main()
{
string greeting = "hi";
cout << greeting * 3 << endl;
cout << "Expected: hihihi" << endl;
greeting = "bye";
cout << greeting * 2 << endl;
cout << "Expected: byebye" << endl;
return 0;
}

Answers

To implement an operator* function so that one can repeat strings a given number of times, add the following code to the given file:

#include <string>

#include <iostream>

using namespace std;

string operator*(string s, int n) {

   string result;

   for (int i = 0; i < n; i++) {

       result += s;

   }

   return result;

}

Now when you run the program, it should output "hihihi" and "byebye" as expected.

Learn more about programming:

https://brainly.com/question/26134656

#SPJ4

Assume a client connects to a server via a lossy link. When an application is sending PDUs of different sizes to the server over the path, compute the expected number of bytes lost when transmitting an arbitrary PDU. A. (1pt) Assume the client does not have reliable data transfer. The link has packet loss probability of 20\%. Application sends 200-byte fixed-length PDUs at all times. Ans:200∗0.2=40
B. (1pt) Assume the client does not have reliable data transfer. The link has packet loss probability of 20\%. Application sends 200-byte PDUs at half of the times, and 400-byte PDUs at the other half. Ans: 80 C. (1pt) Assume the client does not have reliable data transfer. The link has packet loss probability of 20\%. Application sends PDUs following this distribution: 100-byte (10\%), 200-byte (30\%), 400-byte (50\%), 1000-byte (10\%). Ans: D. (2.5pts) Assume that the client transmits 1 million bytes of data to the server. The PDU goes through a 5-layer network stack with 25 bytes of overhead for each layer except the application layer. During the transmission, exactly 1 bit is corrupted during the transmission, and the corresponding packet must be entirely retransmitted to ensure reliable data transfer. How many bytes in total, including both data and overhead, need to be transmitted, if the PDU size is 100, 1000, 2000, 10000, and 200000 bytes? E. (2.5pts) What is the optimal PDU size for the above network scenario in D, i.e., requiring the fewest number of bytes to be transmitted in total? Why?

Answers

The 4 byte trailer at the data link layer, are merely overhead since we are told that our application data only takes up 700 bytes.

All the bytes sent to the physical layer that don't carry actual data are collectively referred to as overhead. The remaining 58 bytes, which are made up of the transport layer header, the network layer header, the 14 byte header at the data link layer, and the 4 byte trailer at the data link layer, are merely overhead since we are told that our application data only takes up 700 bytes. In order to calculate the overhead percentage, we divide the total number of bytes delivered to the physical layer by the overhead bytes as follows: OH % = (58 / 758) * 100 = 7.7 %. The efficiency is the proportion of application-specific bytes to all other conveyed bytes. The efficiency is therefore 66.67%.

Learn more about Application-specific bytes here:

https://brainly.com/question/13753539

#SPJ4

the internet has had an enormous impact on business strategies. among these impacts, the internet has decreased which of the following?

Answers

A company plan gives the entire organization a vision and a course to follow. All personnel within a corporation are required to have clear goals and follow the organization's strategy or mission.

What is the internet impact on business strategies?

Businesses may know more rapidly and simply access a bigger market. This has accelerated the success of new enterprises in achieving their goals.

This vision can be provided by a strategy, which also keeps people from losing sight of the objectives of their organization.

Internet strategy is the plan used by a company to get online and use the web for marketing, customer engagement, and communication through a private website.

This has made it possible for a company to serve customers halfway around the world from one location.

Therefore, the internet has had an enormous impact on business strategies. Among these impacts, the internet has decreased barriers to market entry.

Learn more about business strategies here:

https://brainly.com/question/28561700

#SPJ4

You manage a Windows Server 2012 R2 system that functions as your company's domain controller. You need to use command-line tools to generate a list of all users in the domain and then view the value of the Office property of each user. Which command should you use? A.) csvde -f C:\users.csv B.)ldifde -r "(ObjectClass=user)" -f c: \users.ldif C.) dsquery user -name * | dsget user -display -office D.) dsget user -display -office

Answers

dsquery user -name * | dsget user -display -office command is used.

How to use Dsquery to Get User Display Name?

In an Active Directory, a user's display name is often a combination of their first and last name, although it can also be any string. "John Paul," as an example. A displayname attribute exists for Active Directory users. To obtain the user display name, use the dsquery command. Using the dsquery user command or the broader dsquery * command, we may obtain the user display name.

The user displayname in the active directory can be accessed using the general query command, dsquery *.

Input: dsquery * -filter "samaccountname=admin" -attr displayname

Using the filter parameter's search criteria, we used dsquery * in the command above to obtain the user displayname.

When samaccountname = admin and display using attribute displayname are used, it obtains the user displayname for the corresponding user.

the results of the dsquery operation used to retrieve the user displayname in the command above. The terminal displays John Paul as the active directory user display name.

To know more about such window commands, Check out:

https://brainly.com/question/13263568

#SPJ4

What should you do when entering an angle parking space a perpendicular parking space?

Answers

When entering an angle parking space, and a perpendicular parking space you should:

approach the space at a moderate speed and signal your intention to park. Look over your shoulder to check for any pedestrians, bicyclists, or other vehicles in the area. As you near the space, turn your wheel to the right or left, depending on the direction of the angle, and guide your vehicle into the space, straightening your wheels as you come to a stop.

For a perpendicular parking space, you should approach the space slowly and signal your intention to park. Check for any pedestrians, bicyclists, or other vehicles in the area. As you near the space, align your vehicle with the space, making sure to keep enough room between your vehicle and any other parked cars. Once you are properly aligned, reverse your vehicle into the space, using your side mirrors and rearview mirror to guide you. Make any necessary adjustments to your position, then put the vehicle in "park" and set the parking brake.

In both cases, make sure to park within the marked lines of the parking space and comply with any local parking regulations.

Learn more about angle parking space:

brainly.com/question/9305008

#SPJ4

Select the LastName, ProjectID, and ClientName fields for all records for the employee with the last name of Novak. Which of the following ProjectID values is not associated with Novak?
a. 1
b. 17
c. 26
d. 4

Answers

The ProjectID value that is not associated with the employee with the last name of Novak is 4.

To select the LastName, ProjectID, and ClientName fields for all records for the employee with the last name of Novak, you can use the following SQL query:

SELECT LastName, ProjectID, ClientName

FROM table_name

WHERE LastName='Novak' AND ProjectID != 4;

The project life cycle is the sequence of phases that a project goes through from its initiation to its closure. It includes four main stages: initiation, planning, execution, and closure. During the initiation phase, the project scope is defined and the project objectives are established. In the planning phase, the project plan is developed, the resources are allocated, and the timeline is set. The execution phase is when the project team carries out the project activities and works towards completing the project objectives.

Learn more about The ProjectID:

https://brainly.com/question/15183085

#SPj4

Which of the code segments will always correctly assign the maximum element of the array to the variable max ? Select one: a. I only b. II only c. III only

Answers

The most significant value in arr is negative. This is due to the code setting the maxVal to zero. Because the check is for > maxVal, which is zero if all integers in the array are zero, it will never set maxVal for a negative number.

What do you name code segments?

The name "segment" is derived from the memory segment, a prior technique of memory management that was superseded by paging. When a programme is stored in an object file, the code segment is included in that file; when the loader loads the programme into memory so that it can be executed, various memory regions (in particular, as pages) are allocated, corresponding to both the segments in the object files and segments only needed at run time. For example, the code segment of an object file is loaded into memory and mapped to a corresponding code segment.

Because the code segment in memory is normally read-only and has a set size, it may usually be put in read-only memory (ROM) on embedded systems The requirement for loading. If the code section is not read-only, the design allows for self-modifying code.

Learn more about memory from here;

https://brainly.com/question/11103360

#SPJ4

Difference Between The First Generation Of Computer and Forth
Generation of Computer

Answers

the first generation computers used vacuum tubes and had gigantic brain chips, the forth generation comps are smaller , less clumsier and have small microprocessors, but bigger memory.

A key that contains more than one attribute is called a(n):A) composite key.B) complex key.C) multi-key.D) n-key.E) candidate key.

Answers

A key that contains more than one attribute is called a composite key.

A composite key is a type of key in a database management system (DBMS) that is composed of two or more attributes that together uniquely identify a record in a table. The composite key serves as a primary key and acts as a unique identifier for each record in the table.

In other words, a composite key is a combination of multiple attributes, where each attribute is a field in the table, and the combination of these fields makes the composite key unique for each record. This key is used to establish relationships between tables in a database.

For example, in a table that stores information about students in a school, a composite key could consist of the student's first name, last name, and date of birth. No two students can have the same combination of these attributes, so the composite key can be used to identify each student uniquely.

Learn more about incandescent lamp:

brainly.com/question/10167757

#SPJ4

A customer is in a store to purchase 3 items. Write a program which asks for the price of each item, uses 5.5% for sales tax, then displays:
1. the subtotal of the sale
2. the total amount of tax to be collected
3. the total amount the customer must pay

Answers

A succession of instructions written in a programming language for a computer to interpret is referred to as a computer program.

How is the program utilised?

The program gives the computer the expertise to carry out a specific task. A computer can function with the operating system without application software (apps), but it cannot carry out any particular task. For instance, you need to install Microsoft Word on your computer in order to generate a Word document.

Create a program that requests the price of each item, adds 5.5% sales tax, and shows the information below.

MARKETING TAX =.055

item1 is comparable to a float (input("Enter the price for item 1 in dollars"))

item2 = float('Enter the price for item 2 $', input)

item3 is equal to float(input("Enter the price for item 3 $"))

Float (item1 + item2 + item3) = subtotal

sales tax total = subtotal* SALES TAX

total is the aggregate of the subtotal and the sales tax.

Total = $ ('Total = $', format(total, ',.2f'), sep=", end=") ('nn')

To know more about programs visit:

https://brainly.com/question/14721034

#SPJ4

Functions can be selected by using the ________.
A) Format Function dialog box
B) Create Function dialog box
C) Insert Function dialog box
D) Add Function dialog box

Answers

The Insert Function dialog box can be used to choose a function. Functions are pre-written formulas that carry out calculations using particular values, or arguments.

What kind of formula would that be?

A formula is an expression that computes values in one or more cells in a range. One formula that sums up the values in cells A2 through A4 is =A2+A2+A2+A3+A4.

How do I get Excel's function dialog box to open?

Go to the Formulas ribbon and either click the Insert Function icon to display the Insert Function dialog box (the same dialog box you would see with the first method) or click the arrow next to the appropriate category in the Function Library Group to bring up the Function Library Group and then select the desired function from the list.

To know more about Insert Function dialog box  visit :-

https://brainly.com/question/1957607

#SPJ4

Attackers often target data and intangible assets. Identify what hackers may do with the information they collect. (Select two.)A) Damage or disable a firewallB) Sell the data to the competitionC) Stage an on-path attackD) Hijack DNSE) Harm a company's reputation

Answers

The two options that represent what hackers may do with the information they collect are:

What do hackers do with the information ?Sell the data to the opposition: Attackers may gather confidential or sensitive information, including trade secrets, customer information, and financial data, and sell it to the opposition in order to profit financially.Damage a firm's reputation: Attackers may divulge or alter sensitive information, such as customer information or private messages, in order to embarrass a company, damage its reputation, or sour ties with clients and business partners.

To know more about hackers , check out :

https://brainly.com/question/23294592

#SPJ4

Write an algorithm to find out smallest element in a list

Answers

Answer:

NB : Suppose the list is unordered and elements can be compared between each other

element n = list[0]

FOR element tmp IN list

   IF tmp SMALLER THAN n

       THEN n = tmp

Explanation:

In this case, our algorithm will pass through the whole list, element by element. We define n as the smallest element, and at the start, we define the first element as the smallest.

At each iteration, we compare the current element with the smallest one. If it is smaller than the current smallest element, then the current element will become the smallest element, and we will continue to iterate in the list until the end.

Once we reach the end, we are sure to have the smallest element in the list!

at palantir we have two main software engineering roles: forward deployed software engineer and software engineer. which of these roles resonates the most with your job search and why?

Answers

However, I can provide a general overview of the roles of a Forward Deployed Software Engineer (FDSE) and Software Engineer (SE) at Palantir to help you make an informed decision based on your skills and interests.

About Software

In simple terms, the notion of software is a program on a computer that performs certain functions. Examples of software are Windows, Microsoft Word, Sublime Text, etc. Software consists of a series of procedures and instructions that form a program in digital format.

Learn More About Software at https://brainly.com/question/28224061

#SPJ4

What are the validation methods for software?

Answers

The validation methods for software are: b, testing, modelling and simulation, demonstration, prototyping, User Acceptance Testing.

what are the validation methods for software?

Validation methods are techniques used to ensure that a software system meets its intended requirements and is fit for its intended purpose. The main validation methods used in software development include:

Inspection: A systematic examination of the software artefacts, such as requirements, design, and code, to identify defects and ensure quality.Testing: The process of executing a software system with the intent of finding defects. Testing can be done at different levels, such as unit testing, integration testing, system testing, and acceptance testing.Modelling and simulation: The use of mathematical models and computer simulations to analyse and validate the behaviour of a software system.Demonstration: The process of showing the software system to stakeholders and getting their feedback to determine if it meets their needs and expectations.Prototyping: The process of building a working model of a software system to test its functionality and usability.User Acceptance Testing (UAT): The process of testing the software system by end-users to ensure that it meets their requirements and is ready for release.

These validation methods are not mutually exclusive, and a software development project may use a combination of methods to validate the software system. The choice of validation method depends on the specific requirements of the software system, the project constraints, and the preferences of the stakeholders.

To know more about Validation methods of software, visit:

brainly.com/question/28940163

#SPJ4

most organizations do not opt for it configurations that are purely in-house, packaged, or saas models.TRUEFALSE

Answers

The given statement is False. In fact, many organizations opt for a combination of in-house, packaged, and SaaS configurations, depending on their specific needs and requirements.

What is the difference between in-house, packaged, and SaaS configurations?

In-house configurations are when an organization develops and maintains its own software and IT infrastructure internally. Packaged configurations refer to pre-built software solutions purchased by an organization and installed on their own IT infrastructure. SaaS configurations are when an organization uses software hosted and maintained by a third-party provider, accessed via the internet

To know more about SaaS visit:

brainly.com/question/11973901

#SPJ4

50 POINTS

PYTHON PROGRAMMING I:

TURTLE GRAPHICS PROJECT


For this project you are going to create a program that draws at least 5 flowers. Each flower must have at least 5 flower petals, and can be of any shape, size or color, but each flower petal must be distinguishable from the other. See fig. 1 below. Only one of the flowers may be centered on the canvas. The rest of the flowers can be placed visibly anywhere on the canvas. See fig. 2 Each flower must use a different shape and color scheme.

Answers

Here's some sample code in Python using turtle graphics to draw 5 flowers with different shapes and color schemes:

The Python Code

import turtle

def draw_petal(t, size, color):

 for i in range(2):

   t.begin_fill()

   t.fillcolor(color)

   t.circle(size, 60)

   t.left(120)

   t.circle(size, 60)

   t.end_fill()

   t.left(60)

def draw_flower(t, size, color):

 for i in range(5):

   draw_petal(t, size, color)

   t.left(72)

def draw_center(t, size, color):

 t.dot(size, color)

def draw_flowers():

 wn = turtle.Screen()

 wn.bgcolor("white")

 wn.title("Flowers")

 tess = turtle.Turtle()

 tess.speed(0)

 tess.pensize(2)

 # Draw the first flower centered on the canvas

 draw_center(tess, 20, "red")

draw_flower(tess, 60, "red")

 # Move to a new position and draw the second flower

 tess.penup()

 tess.right(180)

 tess.forward(200)

 tess.pendown()

 draw_center(tess, 20, "yellow")

 draw_flower(tess, 60, "yellow")

 # Move to a new position and draw the third flower

 tess.penup()

 tess.right(180)

 tess.forward(200)

 tess.pendown()

 draw_center(tess, 20, "pink")

 draw_flower(tess, 60, "pink")

 # Move to a new position and draw the fourth flower

 tess.penup()

 tess.right(180)

 tess.forward(200)

tess.pendown()

 draw_center(tess, 20, "purple")

 draw_flower(tess, 60, "purple")

 # Move to a new position and draw the fifth flower

 tess.penup()

 tess.right(180)

 tess.forward(200)

 tess.pendown()

 draw_center(tess, 20, "blue")

 draw_flower(tess, 60, "blue")

 wn.exitonclick()

draw_flowers()

Read more about python programming here:

https://brainly.com/question/26497128

#SPJ1

the code to display the search results relies on many variables. which of these variables are storing a string data type?

Answers

Category "Japanese," search query "sushi," search near "94701," state "CA," and sort by "closest."  these variables are storing a string data type.

What one of these protocols does the browser utilize to fetch and load the webpage?

Resources like HTML documents can be fetched using the HTTP protocol. It serves as the basis for all data communication on the Web and is a client-server protocol, meaning requests are made by the recipient, which is typically a web browser.

Which of the following can be utilized as a means of data transport between a web browser and a web server?

Information can be encoded and transported using the Hypertext Transfer Protocol between a client (like a web browser) and a web server. The most common protocol used to transmit data over the Internet is HTTP.

To know more about string data type visit :-

https://brainly.com/question/9473723

#SPJ4

why pseudocode is so called?​

Answers

Explanation:

Pseudocode is an informal way of programming description that does not require any strict programming language syntax or underlying technology considerations.

You work as a network administrator in a domain environment. You have a new firewall and need to configure it. You are asked to create web filtering and firewall rules based on domain groups. Which of the following protocol will you use to integrate your firewall directly with Active Directory?
A.OpenLDAP
B.LDAP
C.FTP
D.RADIUS
E.RDP

Answers

The protocol you would use to integrate your firewall directly with Active Directory is LDAP (Lightweight Directory Access Protocol).

What is LDAP (Lightweight Directory Access Protocol)?

LDAP is an open, vendor-neutral, industry standard application protocol for accessing and maintaining distributed directory information services over an Internet Protocol (IP) network.

Active Directory is a Microsoft-based directory service that provides centralized authentication and authorization for Windows-based computers in a domain environment. By using LDAP, you can directly connect your firewall to Active Directory and use the information stored in the directory service to create web filtering and firewall rules based on domain groups.

To learn more about LDAP, visit: https://brainly.com/question/28099522?source=archive

#SPJ4

Select the correct answer from each drop-down menu.
Describe the role of a data scientist and the minimum educational qualification needed for the job.
Data scientists ,
Options: A. Design and implement database solutions for organizations, as well as do the maintenance
B. Analyze complex data to help organizations find patterns to their advantage
C. Research, design, and implement systems for organizations to store, retrieve, and store data

and this field requires at least a/an degree.
Options: A. Associate’s
B. Bachelor’s
C. Master’s

Please help me, I’m struggling real bad.

Answers

Answer:

C. Master's degree.

Explanation:

Describe the role of a data scientist and the minimum educational qualification needed for the job.

Data scientists: B. Analyze complex data to help organizations find patterns to their advantage.

and this field requires at least a/an: C. Master's degree.

________ are used to quickly create a presentation by providing predesigned styles and layouts as well as suggested content based on the type you chooseanswer choicesTemplatesGalleriesTabsGroups

Answers

Answer:

Templates is the correct answer

is a special value that represents either unknown or inapplicable data?

Answers

Null is a special value that represents either unknown or inapplicable data.

What is data?

Data is any sequence of one or more symbols in computer science, and a datum is a single symbol of data. Information is derived from data through interpretation. Data that is represented digitally instead of analogically uses the ones-and-zeros binary number system. Data can be in three different states: at rest, in motion, and in use. In most circumstances, data in a computer moves in parallel. Data are pieces of information that have been converted into a format that can be moved or processed quickly. Data is information that has been transformed into binary digital form for use with modern computers and communication mediums. The topic of data may be used in either the singular or the plural.

To know more about data, check out:

https://brainly.com/question/13189580

#SPJ4

15. What are programming languages used for other than to build application software, systems software, embedded systems, and Web sites?

Answers

Answer:

Well you have python (AI), SQL, C++, and probably Java.

Application software is widely used in business to complete specific tasks. These programs are designed for the users by the application developers. An example of Applications software is Microsoft Offices (Word, Excel, PowerPoint).

Which software controls the interaction between the user and the hardware?

The function of the Operating system (OS) is that it is a kind of a software that helps to controls as well as handle  and coordinates the computer hardware devices and it also function by helping to runs other software as well as applications on a computer.

The system software controls the interactions between hardware and user applications. Application Programming Interface (API) is a set of commands, functions, protocols, and objects that programmers can use to create software or interact with an external system. It provides developers with standard commands for performing common operations so they do not have to write the code from scratch.

Therefore, Application software is widely used in business to complete specific tasks. These programs are designed for the users by the application developers. An example of Applications software is Microsoft Offices

Learn more about  Application software on:

https://brainly.com/question/29353277

#SPJ2

Which of the following dedicated expansion slots/ports on the PC motherboard enable(s) connecting an M.2 device? (Select all that apply)
B key slot
M key slot
B and M key slot

Answers

The B key and M key slots are dedicated expansion slots/ports on the PC motherboard that enable connections an M.2 device.

The B key and M key slots are dedicated expansion slots/ports on the PC motherboard. These slots are designed to enable the connection of M.2 devices, such as solid-state drives (SSDs) or other high-speed storage devices. The B key slot is designed for SATA-based M.2 devices, while the M key slot is designed for PCIe-based M.2 devices. Both slots provide higher data transfer speeds than traditional SATA hard drives, allowing for faster boot times and improved performance. In addition, M.2 devices are smaller than traditional SATA hard drives and require less power, making them a cost-effective and energy-efficient solution for upgrading the storage of a PC.

Learn more about connections here-

brainly.com/question/14327370

#SPJ4

complete the following method so that it swaps the first and last element of the given array list. do nothing if the array list is empty. Complete the following file

Answers

The following method so that it swaps the first and last element of the given array list. do nothing if the array list is empty.

What is the array ?

Array is a data structure consisting of a collection of elements (values or variables), each identified by one or more array indices. It is a powerful and versatile tool for managing and manipulating data. Arrays can be used to store lists of related items, or even a single item that is repeated many times. They are used in a variety of programming languages and can be used to solve many different types of problems.

public void swapFirstLast(ArrayList<Integer> list) {

   // your code here

   if (!list.isEmpty()) {

       int temp = list.get(0);

       list.set(0, list.get(list.size() - 1));

       list.set(list.size() - 1, temp);

   }

}

To learn more about array

https://brainly.com/question/24275089

#SPJ4

Write a C++ program to find and print the first perfect square (i*i) whose last two digits are both odd. please try to explain every step by writing comments.

Answers

This program uses a while loop to continuously increment the variable i and calculate its square i * i. The result is then checked to see if its last two digits are both odd (either 49 or 9). If the condition is met, the square is printed and the loop is broken. The program continues to incr

#include<iostream>

using namespace std;

int main() {

int i=1;

while(true) {

  int square = i * i;

  if (square % 100 == 49 || square % 100 == 9) {

    cout<<"The first perfect square whose last two digits are both odd: "<<square<<endl;

    break;

  }

  i++;

}

return 0;

}

What is C++ program ?

C++ is a high-level, general-purpose programming language. It was developed by Bjarne Stroustrup at Bell Labs in the early 1980s. C++ is an extension of the C programming language and was designed to be an object-oriented language that is both efficient and portable. It is widely used for developing applications for desktop and mobile devices, as well as for game development and scientific simulations. C++ programs are usually written in a text editor and compiled using a compiler to produce machine-readable code that can be executed by a computer.

To know more about Programming Language visit: brainly.com/question/22695184

#SPJ4




what is a computer ​

Answers

a computer is a device that is managed by technology

Answer:

A computer is a device that accepts information (in the form of digitalized data) and manipulates it for some result based on a program, software, or sequence of instructions on how the data is to be processed.

Explanation:

Its principal characteristics are: It responds to a specific set of instructions in a well-defined manner. It can execute a prerecorded list of instructions (a program). It can quickly store and retrieve large amounts of data.

4. Given the following raltional schema:
Driver (Name, LicenceNumber, Address)
CAR (Licence Plate, Type, Manufacturer)
OWNER (Licence Plate, LicenceNumber, Date_of_purchase)
Write a relational algebra expression which gives all the drivers living in Debrecen and have a
carl
(4 points)

How do I do this?

Answers

It accepts instances of relations as input and returns instances of relations as output. Relational algebra is a procedural query language. To run queries, it makes use of operators.

What are the five fundamental operators in relational algebra? Give some examples?

Relational algebra has five fundamental operations: Set Difference, Union, Cartesian Product, and Selection. Most required data retrieval activities are carried out by them.

Describe algebraic expression and provide two instances?

An expression that uses pronumerals, parentheses, operation signs, and numbers yet converts to a number when the pronumerals are replaced by numbers is an algebraic expression. For instance, an expression is 2x + 5, but +) is not. 5(x2 + 3x) = 5(22 + 3 2) = 30 and 3x + 1 = 3 2 + 1 = 7 respectively.

To know more about Relational algebra visit :-

https://brainly.com/question/10983796

#SPJ1

it is probably a good idea to define and use an auxiliary function add pt :: point -> point -> point,which adds two points component wise. g

Answers

Define a recursive function to add up all the integers from 1 to a given upper ... Rewrite listmax so that it uses an auxiliary function and an explicit ...

Other Questions
Which of the following should be done if you are unsure of the types of information the audience will need from you?a.Ask the audience for inputb.Follow the audience's blogsc.Access the knowledge management systemd.Cover all key points in detaile.Gather more information than needed What are the terms a0, a1, a2 and a3 of the sequence {an}, where an equalsa. 2n + nb. n(n+1)!c. [n/2]d. [n/2] + [n/2] A steel wrecking ball is moving with 30,000 J of kinetic energy. The ball collides witha spring and comes to a complete stop. If the spring has a k = 50,000 N/m how much is the spring compressed? the theory that says weight is maintained through internal regulatory controls making it difficult to lose weight is called the . multiple choice question. behavior modification theory metabolic weight loss theory set-point theory low-fat and low carbohydrate weight loss assuming that risk-free rates are as in problem 4.5, what is the value of an fra where the holder will pay libor and receive 4.5% (quarterly compounded) for a three-month period starting in one year on a principal of $1,000,000? the forward libor rate for the three-month period is 5% quarterly compounded. Lactose is disaccharide ; which monosaccharides are present in it Consider APQR in the figure below.The perpendicular bisectors of its sides are SV, TV, and UV. They meet at a single point V.(In other words, V is the circumcenter of APQR.)Suppose UV=30, PS= 64, and RV=78.Find PU, PR, and QV.Note that the figure is not drawn to scale. what is the molarity (mol/l) of a sodium hydroxide (naoh) solution containing 30 mg/l? atomic weights: na cam was in a coffee shop. in the table next to him, a group of his students were talking about a party for their favorite teacher. he heard them talking and assumed the party was for him. cam is: select one: a. an intended receiver b. unintended receivers c. a side stream listener find the sizes of the lettered angle[tex]find \: the \: sizes \: of \: the \: lettered \: angle[/tex] (b) How do longitudes determine time? How are the lengths of day and night related to latitudes? Write with examples. Sales of the smart phone continued to grow exponentially beyond 2011.In 2010, approximately 39.99 million smartphones of this brand were sold worldwide.In 2011, approximately 72.9 million smartphones of this brand were sold worldwide.In which year did the number of smartphones the brand sold exceed 200 million? a nurse on the unit fails to help a colleague ambulate a client even though there is time to do so. which are appropriate responses by the nurse who required assistance with the client? select all that apply. how to calculate the percentage change in each of the following examples using the mid-point method. 1. you have 47 ml of a protein solution. you want to add 0.39 g of ammonium sulfate per how much ammonium sulfate do you need to add?] which blood vessels become progressively smaller and branch as they extend away from the heart? is it possible for each of the following to be used in the same study (on the same units)? explain or give an example of such a study. (a) a placebo and a double-blind procedure Yesterday, 5% of the 120 sixth graders were late to school. How many sixth graders were late? Show your work or explain how you arrived at your answer.Please keep it simple The band pearl jam originally named itself after which nba basketball player? When using a 10 ml graduated cylinder, it is initially filled with approximately how many milliliters of water?5ml or 10ml