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
What is microsoft certification?
BabaBlast [244]
Microsoft certification is a series of programs that provide certification of competence in Microsoft products.
6 0
3 years ago
True or false: all blockchains are programmed to have the same block time (confirmation time) as each other.
wariber [46]

Answer:

False

Explanation:

<em>The complexity of the hash, which is the hexadecimal number produced by the hashing process, determines the precise length of time required for block production. Thus, block times won't always be the same.</em>

4 0
1 year ago
Which drugs are known to distort the perception of reality and thought processes
andrey2020 [161]
<span>The correct answer here is Hallucinogen.

Technically all drugs one way or another distort the perception of reality and thought processes but hallucinogens are especially potent in that regard. Hallucinogens are those agents that can cause, among other things, hallucinations and changes in consciousness, emotions and thoughts. LSD is maybe the most known representative of the hallucinogens. </span>
7 0
3 years ago
What is an ISP?<br> in computer Networking
defon
ISP is an abbreviation for internet service provider.
Hope this helps!
4 0
3 years ago
Read 2 more answers
Pick the correct statements regarding cell references.
shusha [124]

Statement two and three is correct.

Statement 1 is incorrect. A relative reference changes when a formula is copied to another cell while Absolute references remain constant. However, it is safe to say that an absolute address can be preceded by a $ sign before both the row and the column values. It is designated by the addition of a dollar sign either before the column reference, the row reference, or both. Statement C is also correct. A mixed reference is a combination of relative and absolute reference and the formula (= A1 + $B$2) is an example of a mixed cell reference.

7 0
3 years ago
Read 2 more answers
Other questions:
  • The ____ function displays the highest value in a range.
    15·2 answers
  • The requirement that each term in the objective function only contains a single variable is in a linear program is referred to a
    5·1 answer
  • This week you will learn about basic code structure. The term structure, as it relates to programming, refers to the decisions y
    14·1 answer
  • What is the most difficult part of working with the Help system?
    8·1 answer
  • 1. Do you agree that Facebook is the best social media platform to use for interpersonal communication? Why or why not?
    13·2 answers
  • Every command or instruction is called
    8·2 answers
  • 3. Discuss microprocessor components, chips,
    15·1 answer
  • Which original VPN protocol is supported by most platforms but offers low levels of security?
    12·1 answer
  • Given class triangle (in files triangle.h and triangle.cpp), complete main() to read and set the base and height of triangle1 an
    11·1 answer
  • Online activities among businesses
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!