Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- const int i = 100;
- int tablica[i];
- int licznik, liczba;
- for (int i = 0; i < 100; i++) {
- if (liczba == tablica[i]) {
- licznik++; //zlicza liczbę wystąpień danej liczby
- cout << "Liczba " << liczba << " jest w tablicy na miejscu " << i << " tablicy" << endl; // sprawdzenie czy jest z dokładnością do 1/100
- }
- }
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement