Input from user in C

PHOTO EMBED

Wed Mar 16 2022 03:49:05 GMT+0000 (Coordinated Universal Time)

Saved by @danihf23 #c

printf("Enter numbers from 1-1000 (To indicate you are done, enter 0)\n");
	
	// Getting input from user
	float input;
	for (int i = 0; i < numsLen; ++i) {
		printf("Enter a number: ");
		scanf("%f", &input);
		if (input == 0) break;
		nums[i] = input;
		++newLen;
	}
content_copyCOPY