Quick actions

cmd+k|ctrl+k

Navigation

Languages

Задание 36 

Snippet info

Language

Cpp

Visibility

public

Author

romanov

Created

2018-12-20T19:20:21Z

Updated

2018-12-20T19:20:21Z

#include <iostream>
#include <cmath>
#include <cstdlib>
using namespace std;

int main()
{
  setlocale(LC_ALL, "Rus");
  int l, m, i, t;
  
  const int n = 10;
  int b[15], a[n];
  for (i = 0; i < n; i++)
  {
    a[i] = rand() % 10;

  }
  cout << " Введите делитель: ", cin >> m, cout<< endl;
  cout << " Введите остаток: ", cin >> l, cout << endl;
  if (0 <= l && l <= m)
  {
    for (i = 0; i < n; i++)
    {
      if (a[i] % m == l)
      {
        cout << a[i] << " " << endl;

      }
      
    }
    
    

  }
  
  return 0;
}
INFO