Hi,
I have made the program below loop for a set number of times, in this case 5 times.
On each pass, it creates an output series of coordinates: (2, 4, 5) for example.
Then it allows you to make another series based on a new set of inputs.
I would like the program to store each set of outputs and their corresponding inputs, and display these after the loop has been run the number of times it was asked to.

I believe this must involve creating new variables for each of the outputs.
But how do I generate these (recursively?) if I allow the user to decide how many times the loop will run, and therefore how many output sets will be created?

Thanks.

Code:
#include <iostream>

int main (void) {

    
/* Variables */
	float Xreal; 
	float Yreal; 
	float Zreal;
	float Xforce;
	float Yforce;
	float Zforce;
	float Tval;
	char inZforce[64];
	
	int check_input;
	char input_buffer[160];
	
	int wloop = 5;

	
/* Prompts */
	
	/* Loop */
	while (wloop > 0)
	{
	wloop--;
	/* Input part 1 */
	printf("Real-Point values in (x, y, z) ");
	fgets(input_buffer, 160, stdin);
	check_input = sscanf(input_buffer, "(%f,%f,%f)", &Xreal, &Yreal, &Zreal);
	while (check_input !=3) {
		//Improper format
		printf("Improper format.");
		return(0);
	};
	
	
	
	/* Input part 2 */
	printf("Zforce value: ");
	fgets(inZforce, 64, stdin);
	Zforce=strtof(inZforce, NULL);
	
	
/* Computation */
	Tval=Zforce/Zreal;
	Xforce=Tval*Xreal;
	Yforce=Tval*Yreal;
	
/* Output Display */
	printf("The point: (%.3f, %.3f, %.3f) was generated with a Tvalue of: %.3f.\n",Xforce,Yforce,Zforce,Tval);
	}
	printf("Complete.\n");
	return(0);
}