repl.it
@pCoding/

gen-random-cpp

C++

No description

fork
loading
Files
  • main.cpp
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <stdio.h>
#include <cstring>
using namespace std;

int main(int argc, char *argv[])
{
    unsigned int arr[8];

    for (int i = 0; i < 8; i++)
    {
        scanf("%d", &arr[i]);
    }

    for (int i = 0; i < 8; i++)
    {
        unsigned int x = arr[1] ^ arr[2] ^ arr[3] ^ arr[7];
        memcpy(arr + 1, arr, 7);
        arr[0] = x;
    }

	for (int i = 0; i < 8; i++)
	{
		printf("%d", arr[i]);
	}
}
Fetching token
?