Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- #include <unistd.h>
- #include <cstdlib>
- #include <math.h>
- using namespace std;
- void cat_picture1();
- void cat_picture2();
- void cat_picture3();
- int main()
- {
- cout << "Hi!";
- usleep(pow(10,6));
- cout << "\nMy name is YOUR name.";
- usleep(pow(10,6));
- cout << "\nI'm intelligent & funny side of your self..)\n";
- usleep(pow(10,6));
- for (int i = 0; i < 5; i++){
- system("clear");
- cat_picture1();
- usleep(2*pow(10,5));
- system("clear");
- cat_picture2();
- usleep(2*pow(10,5));
- system("clear");
- cat_picture3();
- usleep(2*pow(10,5));
- system("clear");
- cat_picture2();
- usleep(2*pow(10,5));
- }
- return 0;
- }
- void cat_picture1(){
- char buff[99000];
- ifstream f("1_cat.txt", ios::binary);
- if (!f) cout << "Error!" << endl;
- else
- {
- int i = 0;
- while (f.get(buff[i])) ++i;
- buff[i] = '\0';
- f.close();
- cout << buff;
- }
- cout << endl;
- }
- void cat_picture2(){
- char buff[99000];
- ifstream f("2_cat.txt", ios::binary);
- if (!f) cout << "Error!" << endl;
- else
- {
- int i = 0;
- while (f.get(buff[i])) ++i;
- buff[i] = '\0';
- f.close();
- cout << buff;
- }
- cout << endl;
- }
- void cat_picture3(){
- char buff[99000];
- ifstream f("3_cat.txt", ios::binary);
- if (!f) cout << "Error!" << endl;
- else
- {
- int i = 0;
- while (f.get(buff[i])) ++i;
- buff[i] = '\0';
- f.close();
- cout << buff;
- }
- cout << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment