Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- /* run this program using the console pauser or add your own getch, system("pause") or input loop */
- using namespace std;
- int main(int argc, char** argv)
- {
- int tab[n],n;
- cout << "Podaj rozmiar tablicy ";
- cin >> n;
- cout << "Wprowadz liczby do tablicy ";
- for (int i=0; i<n ; i++)
- {
- cin >> tab[i];
- }
- for (int i=0; i<n; i++)
- {
- cout << tab[i];
- }
- cout << endl;
- for (int i=0; i<(n/2); i++)
- {
- if(tab[i] == tab[i+(n-i)])
- {
- cout << "Tablica jest symetryczna " << endl;
- }
- else
- {
- cout << "Tablica nie jest symetryczna" << endl;
- }
- }
- cout << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement