Input the number than make an X in the following way,
for instance, when you input a 5 you output
5 1
4 2
3
4 2
5 1
when you input a 7 you output
7 1
6 2
5 3
4
5 3
6 2
7 1
I have two codes at the moment: one that makes the X shape but not incremented and another that increments the numbers just vertically in two rows. Any suggestions on how to do this? or incorporate the two codes together to solve the problem?? Thanks!
#include <iostream>
using namespace std;
int main(int argc, char** argv) {
//Declare Variables
int X;