我对编程和学习基础知识完全陌生.我无法弄清楚我的输出发生了什么.请帮忙.
这是我的代码(在mac上使用xcode)
// C Programing
// Program 6C: Basic While loop Example 2
// In this program we will demonstrate the use of basic while loop
#include <stdio.h>
int main()
{
int values = 1;
int count = 1;
int value_array[values];
printf("Please enter how many values you have: ");
scanf("%d", &values);
printf("You entered %d values.\n",values);
while (count <= values)
{
printf("Please enter your %d\n value: ", count);
scanf("%d", &value_array[count]);
count++;
}
count = 1;
while (count <= values)
{
printf("For …Run Code Online (Sandbox Code Playgroud)