Skip to content

Commit

Permalink
Merge pull request tarunsinghofficial#1815 from Nk786786/main
Browse files Browse the repository at this point in the history
Update 2048.cpp
  • Loading branch information
tarunsinghofficial committed Oct 20, 2021
2 parents 51318ae + 2da7ba4 commit cfff94a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions 2048.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,8 @@ int checkover(int a[4][4])
int main()
{
cout<<"\n\n\n\n\t\t\t2048 GAME\n\n\n\t\tPress any key to continue";
getch();
system("cls");
getch(); // It will take an input from the keyboard.
system("cls"); // It will clear the screen.
int i1,i2,i3,i4,i,j;
int a[4][4]={0},tmp[4][4]={0};
srand(time(0));
Expand All @@ -245,8 +245,8 @@ int main()
int ch;
while (1)
{
for(i=0;i<4;i++)
for(j=0;j<4;j++)
for(i=0;i<4;i++) //Outer for loop.
for(j=0;j<4;j++) //Inner for loop.
tmp[i][j]=a[i][j];
ch=getch();
system("cls");
Expand Down

0 comments on commit cfff94a

Please sign in to comment.