Advertisement
nemat0da

[CPP] Animation

Dec 31st, 2016
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 KB | None | 0 0
  1. #include<conio.h>
  2. #include<iostream.h>
  3. #include <windows.h>
  4. void chgcolor(unsigned short color) {
  5. HANDLE sCon = GetStdHandle(STD_OUTPUT_HANDLE);
  6. SetConsoleTextAttribute(sCon,color);
  7. }
  8.  
  9. void main()
  10. {
  11. clrscr();
  12. char name[12];
  13. char con; 
  14. char x[]="Happy New Year...!!!";
  15. int a=50,i,b;
  16. chgcolor(10);
  17. gotoxy(32,11); cout <<"Input your name : ";cin>>name;
  18. clrscr();
  19. chgcolor(10);
  20. gotoxy(32,11); cout <<"Welcome " <<name;endl;
  21. gotoxy(25,12); cout <<"You wanna continue ? [Y/N} ";cin>>con;
  22. clrscr();
  23. if ( con == 'Y' || con == 'y') {
  24. for ( i=1;i<=100;i++) {
  25. for (int x=1;x<a*100;x++) {
  26. for (int y=1;y<a*100;y++) {
  27. }
  28. }
  29. gotoxy(32,11);cout<<"Loading " <<i<< "%";
  30. while (i == 99 )
  31. goto next;
  32. }
  33. } else {
  34. cout<<"oke thx u";
  35. }
  36.  
  37. next:
  38. for(i=0; i<50; i++){
  39. clrscr();
  40. for(a=0; a<999999;a++) {
  41. for(b=0; b<999; b++) {
  42. }
  43. } gotoxy(1,1);cout<<"********************************************************************************";
  44. gotoxy(32,11);cout<<x;
  45.  
  46. for(a=0; a<999999;a++) {
  47. for(b=0; b<999; b++) {
  48. }
  49. }
  50. }
  51. getch();
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement