Home > Back-end >  An array of problems
An array of problems

Time:09-19

#include

using namespace std;

Int main ()
{
Int n, k, a, b;
Cout & lt; & lt;" Please enter the total number of lamps and the total number of people (the total number of lamp is greater than or equal to the total number of people less than or equal to 1000), respectively: ";
Cin & gt;> N> k;
A=n; B=k;
Int light [a] [b]={0};

For (b=0; bFor (a=0; aIf ((a + 1) % (b + 1)==0)
Light [a] [b] + +;

For (a=0; aFor (b=1; bLight [a] [0] +=light [a] [b];

For (a=0; aIf (light [a] [0] % 2==1)
Cout & lt; return 0; }
Constants defined array application, but I was using a variable, why can run, and the results correct?
O great god answers,

CodePudding user response:

Is it new standard c + + supports syntax?
  • Related