Animasi Lucu C++
#include <iostream.h> #include <conio.h> #include <stdlib.h> int top,i; char key,temp,e; char stack[10]; void delay(); void pushanim() { for(i=0;i<=17; i++) { gotoxy(22+i,7);cout<<" "; gotoxy(23+i,7); cout<<temp; delay(); } for(i=1;i<=(14-top);i++) { delay(); gotoxy(40,6+i); cout<<" "; gotoxy(40,7+i); cout<<temp; } } void popanim(char temp) { for(i=1;i<=(14-top);i++) { delay(); gotoxy(40,22-i-top); cout<<" "; gotoxy(40,21-i-top); cout<<temp; } for(i=1;i<=19;i++) { delay(); gotoxy(38+i,7); cout<<" "; gotoxy(39+i,7); cout<<temp; delay(); } gotoxy(58,7);cout<<" "; } void push(char e) { top=top+1; stack[top]=e; pushanim(); } void pop(char e) { if(top !=0) { e=stack[t...
Comments
Post a Comment