Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // AZ-zadanie.cpp : Defines the entry point for the console application.
- //
- #include "stdafx.h"
- #include <iostream>
- #include <string>
- #include <cstdlib>
- using namespace std;
- int main()
- {
- int rozmiar, zmienna;
- cout << "Podaj rozmiar tabliczy: ";
- cin >> rozmiar;
- int *tab = new int[rozmiar];
- for (int i = 0;i < rozmiar;i++)
- {
- cout << "Podaj " << i + 1 << " zmienna: ";
- cin >> tab[i];
- }
- cout << "Podaj jaka zmienna mamy szukac";
- cin >> zmienna;
- for (int i = 0;i < rozmiar;i++)
- {
- if (tab[i] == zmienna)
- {
- cout << "wystepuje";
- break;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement