Pushing Values (First In, First Out)
How can you push a value to the next place when a new value is entered? Is there another way? This is my program: < START > #include<iostream.h> #include<conio.h> #include<stdlib.h> void main(){ clrscr(); int dDigit01 = 0; int dDigit02 = 0; int dDigit03 = 0; int dDigit04 = 0; char choice; OVERAGAIN: cout << "ÉÍÍÍËÍÍÍËÍÍÍËÍÍÍ»\n"; cout << "º º º º º\n"; cout << "ÈÍÍÍÊÍÍÍÊÍÍÍÊÍÍͼ\n"; gotoxy(3,2); dDigit01 = getche(); gotoxy(3,2); dDigit02 = getche(); gotoxy(7,2); cout << dDigit01; gotoxy(3,2); dDigit02 = getche(); gotoxy(7,2); cout << dDigit01; gotoxy(11,2); cout << dDigit02; gotoxy(3,2); dDigit02 = getche(); gotoxy(7,2); cout << dDigit01; gotoxy(11,2); cout << dDigit02; gotoxy(15,2); cout << dDigit03; cout << "\n\nDo you want to try again to insert numbers; 1 or 0."; cout << "[A] - Start Again | [B] Exit\n"; choice = getche(); switch (choice) { case 'A' | 'a': clrscr(); goto OVERAGAIN; case 'B' | 'b': exit(0); } getch(); } < END > So all I wanted is when I enter 1201, it will represent 1021.