нужна помощь в с++
#include "pch.h"
#include
#include

using namespace std;

int main()
{

int M[10];
int Num = 10;

for (int i = 0; i < Num; i++)
{
cin >> M[i];
}

for (int Ar = 0; Ar < Num; Ar++)
{
for (int NewAr = Ar + 1; NewAr < Num; NewAr++)
{
if (M[NewAr] == M[Ar])
{
M[NewAr] = M[Num - 1];
Num--;
}
}
}
for (int s = 0; s < Num; s++)
{
cout << M[s] << "\n";
}

}


объяснить , как работает программа... а именно циклы for
Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Answers & Comments


Copyright © 2024 SCHOLAR.TIPS - All rights reserved.