Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <array>
- using namespace std;
- void generar (int a)
- {
- int c=1;
- int primer = a;
- cout << a;
- a = a*primer%25;
- while (a != primer)
- {
- cout << ", " << a;
- a = a*primer%25;
- c++;
- }
- cout << "}\n";
- cout << "|<" << primer << ">| = " << c << "\n\n";
- }
- int main()
- {
- int n=0;
- array<int,20> z25;
- for (int i=0; i<20; i++)
- {
- n++;
- if(n % 5 != 0)
- z25.at(i) = n;
- else
- i--;
- }
- for (int i=0; i<20; i++)
- {
- cout << '<' << z25.at(i) << "> = {";
- generar(z25.at(i));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement