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;
}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter