I'm a freshman at my HS taking a C++ class, sorry for bad code or mistakes.
How do I make these numbers: 1,3,7,2 rotate numerical orders everytime the program runs? Thank you very much
For ex: 1372 will turn to 7132 then 3127 etc... each time the program runs
#include <iostream>
using namespace std;
void shiftNums(int a, int b, int c, int d);
int main()
{
int rotate = 0;
int first = 1;
int second= 3;
int third = 7;
int fourth = 2;
Rotate once? Something like dummy = first, first = second, second = third, third = fourth, fourth = dummy. Or std::swap(first, second); std::swap(second, third); std::swap( third, fourth); up to you.
Repeate da capo.