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
PLEASE help me RIGHT NOW!!!!!!!!! I will give a Brainly to anyone who helps me!
dybincka [34]
I am deeply sorry for the experience that you have received, I am disappointed in myself for letting this happen. If it would be possible I would like to make it up to you. Again, I am deeply sorry that this happened. 
Sincerely *enter full name*

I am not sure if you have any multiple choice options but I hope this works xx
8 0
3 years ago
Which two features could be added to a game using an "if () then " block
mafiozo [28]

The two features could be added to a game using an "if () then " block are:

  • Using nested If Then blocks.
  • Checks the specific Bid quantity for the instrument.

<h3>What does the If Then block mean?</h3>

The If Then block is known to be the outputs one of  a given two values, that is as a result of  the value of a Boolean input.

Note that  the input value  is very important and as such, The two features could be added to a game using an "if () then " block are:

  • Using nested If Then blocks.
  • Checks the specific Bid quantity for the instrument.

Learn more about game  from

brainly.com/question/1786465

#SPJ1

3 0
2 years ago
A(n) ____ consists of a series of related instructions, organized for a common purpose, that tells the computer what tasks to pe
yarga [219]

Answer:

The correct answer is "Program".  

Explanation:

Program is the collection of statement or instruction which is developed for creating any software or any purpose. The program is implemented or executed by a computer to perform a particular task.The particular programmer always writes an instruction to develop a program.

Program are always organized for the common purpose, that specifies the computer what tasks to perform as well as how to perform that particular task for example if programmer develops a program of calculator then it should be only used for the calculation purpose.

7 0
3 years ago
Who likes sandshrew ​
zvonat [6]

Answer:

sandshrew is a cute character in pokemon

6 0
3 years ago
Let’s say you attach four images to accompany an important tweet that you’ve composed in the Hootsuite Compose Box. On Twitter,
Damm [24]
I doub between:

<span>  C)  A series of 4 full size, but individual tweets (with the tweet copy appearing above the first image of the series)  D)  A collage format, with full size images</span>

6 0
4 years ago
Other questions:
  • Mike wants to build an amplifier. Which technology can he use?
    15·1 answer
  • True or false words spelling and grammar check is always %100
    7·2 answers
  • Wich of these is an example of magnetic storage
    11·1 answer
  • Nvm, Its B.
    10·1 answer
  • Ecommerce sites sell this to generate income
    11·1 answer
  • A computerized spreadsheet program is useful for
    6·2 answers
  • What happens when a flash memory card is installed in a slot and it is recognized by windows?
    6·1 answer
  • Chunking is a good strategy for completing large assignments because it makes the work
    7·2 answers
  • What is the output of the following program?
    11·1 answer
  • PLS REPLY ASAP WILL MARK BRAINLIEST
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!