Generate array with random numbers and search for an element in it
Do not using using namespace std

bringing in entire namespaces can be convenient, but in the long run, it's a really bad habit.

You should explicitly use std::cout and the like instead. 

Declare variables as close as possible to their first use.

int inp, zuf, i, num, trig=0;


This means very little out of context.

Prefer using std::array instead of regular c-style arrays.

std::array&lt;int, amount&gt; arr;


This plays better with the rest of the standard.

Do not use 1-based indexing unless you really need it.

And in your case, you definitely do not want it, as you are doing an out-of-bounds access on arr[i] when i == amount;

for (int i = 1; i &lt; amount + 1; i++) {


should be 

for (int i = 0; i &lt; amount; i++) {


But it doesn't matter because:

prefer using ranged-based for unless necessary

for(auto&amp; val : arr) {
  val = ...
}


Do not use srand()/rand()

They are terrible. It's slow and not particularly random. You should use the random number genreator provide by &lt;random&gt; instead:

https://en.cppreference.com/w/cpp/numeric/random/uniform_int_distribution.

Separate your concerns:

I suspect you are not respecting the "spirit of the exercise", since filling the array doesn't serve a purpose in your example.

You probably want to first fill the array, and then ask the user (possibly multiple times) to provide a number to find.