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
Sav [38]
3 years ago
5

The "origin" of the cartesian plane in math is the point where x and y are both zero. Given a variable, origin of type Point-- a

structured type with two fields, x and y, both of type double, write one or two statements that make this variable's field's values consistent with the mathematical notion of "origin".
Computers and Technology
1 answer:
Sergeeva-Olga [200]3 years ago
3 0

Answer:

  1. #include <iostream>
  2. using namespace std;
  3. struct Point{
  4.    double x;
  5.    double y;
  6. };
  7. int main()
  8. {
  9.    Point origin;
  10.    origin.x = 0;
  11.    origin.y = 0;
  12.    return 0;
  13. }

Explanation:

The solution code is written in C++.

Firstly, we create a data structure Point with two fields, x and y (Line 5 -8).

In the main program, declare an origin object with Point type (Line 12).

Set the x and y fields of origin object to zero using dot syntax (Line 13-14).

You might be interested in
File Sales.java contains a Java program that prompts for and reads in the sales for each of 5 salespeople in a company. It then
myrzilka [38]

Answer:

import java.util.Scanner;

public class Sales

{

public static void main(String[] args) {

   

    int sum;

    Scanner input = new Scanner(System.in);

   

    System.out.print("Enter number of salespeople: ");

    int salespeople = input.nextInt();

    int[] sales = new int[salespeople];

       

    for (int i=0; i<sales.length; i++)

    {

     System.out.print("Enter sales for salesperson " + (i+1) + ": ");

     sales[i] = input.nextInt();

    }

    System.out.println("\nSalesperson   Sales");

    System.out.println("--------------------");

    sum = 0;

       int maxSale = sales[0];

       int minSale  = sales[0];

       int minId=1;

       int maxId=1;

    for (int i=0; i<sales.length; i++)

    {

               System.out.println("     " + (i+1) + "         " + sales[i]);

 sum += sales[i];

  if(maxSale < sales[i])

           {

               maxSale = sales[i];

               maxId = i+1;

           }

           if(minSale > sales[i])

           {

               minSale = sales[i];

               minId = i+1;

           }

   }

System.out.println("Total sales: " + sum);

       System.out.println("The average sale is: " + sum / salespeople );

       System.out.println("Salesperson "+ maxId + " had the highest sale with "+ maxSale + ".");

       System.out.println("Salesperson "+ minId + " had the lowest sale with "+ minSale + ".");

       

       int amount = 0;

       int counter = 0;

       System.out.print("Enter an amount: ");

       amount = input.nextInt();

       for (int i=0; i<sales.length; i++)

    {

     if(sales[i] > amount) {

         counter++;

         System.out.println("Salesperson "+ (i+1) + " exceeded given amount. (Number of sales: " + sales[i] +")");

     }

    }

       System.out.println("Number of salespeople exceeded given amount is: "+ counter);

}

}

Explanation:

- Ask the user for the number of salesperson

- According to entered number, create an array called sales to hold sale number for each person

- In the first for loop, assign the given sales numbers

-  In the second for loop, print all the sales people with sales, calculate the total sales. Also, find the minimum and maximum sales numbers with associated individuals.

- Print total, average, highest, and lowest sales.

- Ask user enter an amount

- In the third for loop, find the sales people who exceeded this amount.

- Print number of sales people who exceeded the amount.

8 0
3 years ago
Define
3241004551 [841]

Computational thinking- the thought processes involved in formulating a problem and expressing its solution(s) in such a way that a computer—human or machine—can effectively carry out. Computational Thinking is an iterative process based on three stages.

Problem solving process- The process of working through details of a problem to reach a solution. Problem solving may include mathematical or systematic operations and can be a gauge of an individual's critical thinking skills.

Data- facts and statistics collected together for reference or analysis.

Information- facts provided or learned about something or someone.

Algorithm- a process or set of rules to be followed in calculations or other problem-solving operations, especially by a computer.

Aggregate data- aggregate data are data combined from several measurements. When data are aggregated, groups of observations are replaced with summary statistics based on those observations. In a data warehouse, the use of aggregate data dramatically reduces the time to query large sets of data.

Discovery Data- in the context of IT, is the process of extracting actionable patterns from data. The extraction is generally performed by humans or, in certain cases, by artificial intelligence systems.



3 0
3 years ago
Troy, an aspiring screenwriter, aspires to work with a famous director known for his philanthropic work. Troy gets an appointmen
kicyunya [14]

Troy should include a short overview of the story that his video will tell and why he wants to tell it (or what the video will be about and why). It should also include the target audience, and where the video will be published.

7 0
3 years ago
Where to buy a ps5<br> I really want one please help meh
lianna [129]

Answer:

You can buy one at gamestop, target, walmart, best buy and probably more stores

3 0
2 years ago
Read 2 more answers
What is full form of RAM??? ​
stepladder [879]

Answer:

Random Access Memory, it's used to store working data and machine codes

Explanation:

Hope it helped !
Adriel

7 0
2 years ago
Read 2 more answers
Other questions:
  • The _____ command icon looks like a small clipboard with a page attached.
    6·1 answer
  • Optimally, the __________ guides investment decisions and decisions on how ISs will be developed, acquired, and/or implemented.
    6·1 answer
  • When a defendant pleads guilty to one offense just to have another offense dropped, this is what type of plea bargain
    12·2 answers
  • Gmod how to make someone admin on a lan server
    6·2 answers
  • You are trying to log in to your old computer, and can't remember the password. You sit for hours making random guesses... I'm s
    10·1 answer
  • What electronic device can represent a KiloByte?
    14·1 answer
  • When would you insert a merge field?
    10·2 answers
  • I was killed <br><br> යඞ <br><br> what do i do
    10·1 answer
  • Potential Energy and Kinetic Energy both mean "energy in motion" True or False​
    8·2 answers
  • Dennis would like to include a video in a presentation. The source of the video is on the internet, but he would like to ensure
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!