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
neonofarm [45]
3 years ago
14

We have an N x N square grid.

Computers and Technology
1 answer:
max2010maxim [7]3 years ago
5 0

Answer:

The solution in C++ is:

#include <iostream>

using namespace std;

int main(){

   int N, A;

   cout<<"Grids: ";    cin>>N;

   cout<<"White: ";    cin>>A;

   cout<<"Black: "<<N * N - A;

   return 0;

}

Explanation:

This declares N and A, as integers

   int N, A;

This gets inputs for N

   cout<<"Grids: ";    cin>>N;

This gets inputs for A, (the white grids)

   cout<<"White: ";    cin>>A;

This calculates and prints the number of black grids

   cout<<"Black: "<<N * N - A;

<u>PS</u>

From the question, we understand that the grid is N by N square grids.

This means that:

Total = N * N

So, the number of black grids is:

Black =  Total - A

You might be interested in
If you’re presenting in a darkened room, what text and background should you use to provide maximum readability?1) Light text on
ludmilkaskok [199]

Answer:

1

Explanation:

1 because it would be difficult for people to read on the other ones that you put.

3 0
4 years ago
Which layer in the Transmission Control Protocol/Internet Protocol (TCP/IP) model is responsible for delivering data between two
s2008m [1.1K]

Answer:

Network.

Explanation:

The Transmission Control Protocol/Internet Protocol (TCP/IP) model is a standard networking protocol which allows network devices such as routers, switches, and host computers to interconnect and communicate with one another over a network. The Transmission Control Protocol/Internet Protocol (TCP/IP) model comprises of four (4) layers and these includes;

I. Application layer.

II. Transport layer.

III. Internet layer.

IV. Network layer.

The network layer in the Transmission Control Protocol/Internet Protocol (TCP/IP) model is responsible for delivering data between two nodes.

Basically, this layer known as network layer is the fourth layer of the Transmission Control Protocol/Internet Protocol (TCP/IP) model and it is typically responsible for the transmission of packets from one network device to another.

4 0
3 years ago
In an SLR camera photogaphers look from the viewfinder through which of the following?
Fantom [35]
The answer is A mirror the lens
8 0
3 years ago
Read 2 more answers
On laptops with a smart card reader installed, where is the smart card reader usually located?
dem82 [27]
Plenty of space in the palm rest
4 0
3 years ago
How to assign some object key values to other name react const.
notsponge [240]

Props are an ordinary object of React that follow the immutable properties. This simply means that you cannot change their value throughout the component. Props and states are in the form of an object which contains the number of key value pairs that could be used to render the value of the objects

8 0
3 years ago
Other questions:
  • Write a program that estimates the approximate number of times the user’s heart has beat in his/her lifetime using an average he
    12·1 answer
  • Which social networking function came first?
    9·2 answers
  • Which of these is a typographical clue?
    9·2 answers
  • What type of product does amd manufacture
    5·1 answer
  • In which type of attack do you get malicious code in links from seemingly reliable websites?
    14·1 answer
  • The multitasking, multi-user, operating system developed by Bell Laboratories that operates on a wide variety of computing platf
    13·1 answer
  • Briley has all the hardware she needs to construct a fully functional personal computer. She connects the various components and
    7·1 answer
  • Biomimicry is the term used when engineers are inspired by objects found in nature? Group of answer choices True False
    10·1 answer
  • Each sentence in the paragraph below has a number. Choose the number of two sentences that are in the wrong order in this story.
    14·1 answer
  • What does an "embedded video" mean
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!