Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- ifstream f("date.in");
- int main()
- {
- int n[100][100];
- for(int i = 0; i < 12; i++)
- for(int j = 0; j < 6; j++)
- f >> n[i][j];
- char m[100][100];
- int nr;
- cin >> nr;
- int aux = nr;
- nr = 0;
- while(aux){
- nr = nr*10+aux%10;
- aux /= 10;
- }
- int c = 0;
- int k = 0;
- int a;
- while(nr){
- a = nr%10;
- for(int i = (a-1)*6; i < 6+(a-1)*6; i++){
- for(int j = 0; j < 6; j++)
- m[k][j+c*6] = n[i][j];
- k++;
- }
- k = 0;
- c++;
- nr /=10;
- }
- for(int i = 0; i < 6; i++)
- puts(m[i]);
- return 0;
- }
- //date.in
- /*
- 32 32 32 178 178 32
- 32 32 178 32 178 32
- 32 178 32 32 178 32
- 32 32 32 32 178 32
- 32 32 32 32 178 32
- 32 32 32 32 178 32
- 32 32 178 178 178 32
- 32 178 32 32 32 178
- 32 178 32 32 32 178
- 32 32 32 178 178 32
- 32 32 178 32 32 32
- 32 178 178 178 178 178
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement