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
Which interest bearing account is best for people who won’t need access to their money for several months or longer?
lutik1710 [3]

The correct answer to this question is a certificate of deposit.

A certificate of deposit is an interest bearing account that pays a higher rate of interest than a savings account or interest bearing checking account because you are committing to leave it in the bank for a specified period of time. The CD could be for serveral months, or extend out to multiple years. Normally the interest rate will increase as the length of time increases.

3 0
3 years ago
Software that interprets commands from the keyboard and mouse is also known as the ​
Luda [366]

Answer:

THE OPERATING SYSTEM (OS)

Explanation:

6 0
3 years ago
1. Grade data is:
horrorfan [7]

Answer:

1.)

import math

def min_max(lst):

   minimum = math.inf

   maximum = -math.inf

   for x in lst:

       if minimum > x:

           minimum = x

       elif maximum < x:

           maximum = x

   return minimum, maximum

2.)

def deltaGrade(lst):

   sm = 0  #sm is sum

   for x in lst:

       sm += x

   mean = sm/len(lst)

   deltaG = 75 - mean

   return deltaG

7 0
3 years ago
There is no need to schedule video calls ahead of time; they can be used the same way as
UNO [17]

Answer:

The answer to this question is "True".

Explanation:

The term video calling is part of communication. In this type of communication will be used in every place like house, office for video conferencing, etc. It was developed in 1968 by AT&T's Bell Labs. It works on internet.This type of calling we can face to face communicate means, we watch the person. In the video calling, there is no need for a schedule it is used as a phone call.  

6 0
3 years ago
When text is used as a Hyperlink, it is usually underlined and appears as a different color.
Artist 52 [7]
True it usually shows up with a blue underline
7 0
3 years ago
Other questions:
  • Was the big blue button thing a good decision or bad?<br> *I think it was a bad idea.
    15·2 answers
  • Illusions in physcology​
    14·1 answer
  • What does it mean when a computer can't break the rules
    10·2 answers
  • Very Short Answer Type Question (any 9)
    12·1 answer
  • Anyone has any ideas for a gaming setup i can buy for christmas. Something with high framing rates (monitor included) for about
    15·1 answer
  • _____moves the head to proper track
    13·2 answers
  • How many string object are in 128,55 in python
    7·2 answers
  • Which symbol is used for an assignment statement in a flowchart?
    13·1 answer
  • The hostel in which you plan to spend the night tonight offers very interesting rates, as long as you do not arrive too late. Ho
    5·1 answer
  • Write steps: To open an old documents​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!