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
tresset_1 [31]
3 years ago
8

Pomógłbymi ktoś z takim zadaniem? C++

Computers and Technology
1 answer:
Elenna [48]3 years ago
8 0

#include <iostream>

using namespace std;

int main(int argc, char** argv) {

 

int n;

cout<<"Podaj n: ";

cin>>n;

 

int **tab=new int *[n];

 

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

 tab[i]=new int [n];

}

 

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

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

  if(j==l || n-l-1==j) tab[l][j]=0;

  else tab[l][j]=1;

 }

}

 

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

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

 cout<<tab[i][j];

 }

 cout<<"\n";

}

 

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

  delete [] tab[i];

}

delete [] tab;

return 0;

}

Siema Marcin tak wgl.

You might be interested in
Stages of reverse engineering
ivann1987 [24]

Answer:

Capture Data, Refine the Model, and then Manufacture it.

Explanation:

5 0
2 years ago
Consider a system running ten I/O-bound tasks and one CPU-bound task. Assume that the I/O-bound tasks issue an I/O operation onc
Dmitriy789 [7]

Answer:

10 minutes

Explanation:

3 0
3 years ago
What is number system?<br>​
MrMuchimi

Answer:

A numeral system is a writing system for expressing numbers; that is, a mathematical notation for representing numbers of a given set, using digits or other symbols in a consistent manner. The same sequence of symbols may represent different numbers in different numeral systems.

Explanation:

8 0
2 years ago
If the ____________ is broken on a laptop, chances are other parts are also broken.
ella [17]
Central processing Unit
8 0
2 years ago
To avoid legal issues and set clear guidelines and expectations for employees, employers should put which of the following in pl
Mademuasel [1]

Answer: social media policy

Explanation:

In order to avoid legal issues and also set clear guidelines and expectations for the employees in an organization, it is required that employers should put a social media policy in place.

A social media policy refers to a document which outlines how an organization and the employees will behave and conduct themselves online. This helps to checkmate and curtail the activities of the employees so that there won't be a detrimental effect on the organization.

8 0
2 years ago
Other questions:
  • The overall purpose of a food guide is________.
    11·1 answer
  • A network administrator was told by the Chief Information Officer (CIO) to set up a new office with a network that has redundanc
    7·1 answer
  • Truck drivers probably cannot see your vehicle if you cannot
    6·2 answers
  • Which of the following examples can be solved with unsupervised learning?
    8·1 answer
  • Write a function SwapArrayEnds() that swaps the first and last elements of the function's array parameter.
    6·1 answer
  • Explain any two features of a computer​
    15·1 answer
  • Are there any Potential Dangers in Artificial Intelligence?
    11·2 answers
  • ________ is a group meeting-based process for requirements collection. a. Reverse engineering b. Joint application design c. Hum
    9·1 answer
  • Draw a flowchart that solve the problem of calculating the average of 5 numbers.
    7·1 answer
  • Which two extensions in scratch are correctly matched to their accessibility goals
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!