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
horsena [70]
3 years ago
14

Write a C++ program that prompt the user to enter three points (x1, y1), (x2, y2), (x3,y3) of a triangle and

Computers and Technology
1 answer:
My name is Ann [436]3 years ago
5 0

Answer:

#include<iostream>

using namespace std;

int main(){

   int x1,x2,x3;

   int y1,y2,y3;

   cout<<"Enter the value of first point(x1,y1): ";

   cin>>x1>>y1;

   cout<<"\nEnter the value of second point(x2,y2): ";

   cin>>x2>>y2;

   cout<<"\nEnter the value of third point(x3,y3): ";

   cin>>x3>>y3;

   

}

Explanation:

first include the library iostream for use the input/output commands

then, write the main function. within the main function declare the variable which store the value of points.

after that, use the 'cout' for output. It has the function which print the value or message on the screen.

and 'cin' is used to store the value in the variable.

So, in the above code cout ask for enter the value of point and after enter value by user, cin store in the variables.

Note: you have to enter two value with space or by enter.

You might be interested in
Drag each tile to the correct box.
vekshin1

Answer:

1. Spreadsheet software.

2. Word processor.

3. Database software.

4. Multimedia software.

Explanation:

A software can be defined as a set of executable instructions (codes) or collection of data that is used typically to instruct a computer on how to perform a specific task and solve a particular problem.

Simply stated, it's a computer program or application that comprises of sets of code for performing specific tasks on the system.

Basically, the various type of softwares used on computers to perform specific functions include the following;

1. <u>Spreadsheet software</u>: it can be used to create tables with embedded calculations. A spreadsheet can be defined as a file or document which comprises of cells in a tabulated format (rows and columns) typically used for formatting, arranging, analyzing, storing, calculating and sorting data on computer systems.

2. <u>Word processor</u>: it can be used to format or edit .doc files. Some examples of word processors are Notepad, Microsoft Word, Sublime text, etc.

3. <u>Database software</u>: it can be used to store data in ordered form. Thus, it allows computer users to efficiently retrieve and manage their data with an appropriate level of security. These records are stored and communicated to other data user when required or needed.

4. <u>Multimedia software</u>: it can play .mpg and .mp3 files. A multimedia software refers to a software that is designed and developed to accept, utilize and combine various file formats such as audio, video, text, animation effects, etc.

7 0
3 years ago
What is the best way to protect computer equipment from damage caused by electrical spikes
bixtya [17]

An electrical spike is a temporary, very short (less than a second), increase in the electrical supply voltage.  A common surge protector will stop voltage spikes and surges.  Use surge protectors and UPS devices by connecting all sensitive electronic equipment to UPS or surge protection devices.

8 0
3 years ago
1.What is a keyboard layout.
irina [24]

Answer:A keyboard layout is any specific physical, visual or functional arrangement of the keys, legends, or key-meaning associations  of a computer keyboard, mobile phone, or other computer-controlled typographic keyboard.

An output device is any peripheral that receives data from a computer, usually for display, projection

A printer is an output device that prints paper documents. This includes text documents, images, or a combination of both

Laser Printers and LED printers

Explanation:

8 0
3 years ago
The producer thread will alternate between sleeping for a random period of time and inserting a random integer into the buffer.
Llana [10]

Answer:

// Producer Thread

void *producer(void *param) {

buffer_item item;

while (true) {

item = rand() % 100;

sem_wait(&empty);

pthread_mutex_lock(&mutex);

if (insert_item(item))

printf("Can't insert item\n");

else

printf("Producer %d: produced %d\n", *((int*)param), item);

pthread_mutex_unlock(&mutex);

sem_post(&full);

}

}

// Consumer Thread

void *consumer(void *param) {

while (true) {

buffer_item item = NULL;

if (in > 0)

item = buffer[in - 1];

sem_wait(&full);

pthread_mutex_lock(&mutex);

if (remove_item(&item))

printf("Can't remove item\n");

else

printf("Consumer %d: consumed %d\n", *((int*)param), item);

pthread_mutex_unlock(&mutex);

sem_post(&empty);

}

}

Explanation:

An outline of the producer and consumer threads appears as shown above.

3 0
3 years ago
QUESTION 56 Use the Windows ________ to check on a nonresponsive program. Backup utility Error-checking System Restore Task Mana
ASHA 777 [7]

Answer: Task manager

Explanation: The task manager window represents an interface in personal computers manufactures by Microsoft. The task manager window contains several information about a computers current processes usually displayed in graphical manner, in addition it provides information on the current running processes and application, the uptime of the computer, the graphic processor. With the task manager window users can set process priorities and prioritize applications, by affording users to view process and their corresponding load on the CPU, users can terminate or close applications from within the task manager interface. Hence non-responsuve programs can be viewed and terminated.

5 0
3 years ago
Other questions:
  • As the driver it is not your responsibility that you are focused on the driving task with any possible distractions minimized. T
    9·2 answers
  • Which of the following is a Microsoft solution that runs on a Microsoft Terminal Services server but appears, to end users, as i
    10·1 answer
  • You disassemble and reassemble a desktop computer. when you first turn it on, you see no lights and hear no sounds. nothing appe
    11·2 answers
  • What is a bug?
    11·2 answers
  • What is the maximum transmission speed for bluetooth v3 and v4 devices?
    12·1 answer
  • 14. Convert 11110111 from binary to denary<br> (1 Point)
    12·2 answers
  • If you need to define a connection request policy to apply to an 802.1x authenticating switch or a wireless access point, which
    12·1 answer
  • Create a program that generates a report that displays a list of students, classes they are enrolled in and the professor who te
    11·1 answer
  • Write a program that has an array of at least 50 string objects that hold people’s names and phone numbers. The program then rea
    12·1 answer
  • This is an example of what type of formula? =average(d1:d17) question 1 options: addition subtraction range average
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!