Я пытаюсь написать простой код на C в блокноте Jupyter, который принимает ввод пользователя.Примером этого является:
// Problem 7.4
// Write a program that calculates the average of an array of 10 floating-point values.
#include <stdio.h>
int main (void)
{
float values[10] = {0};
for ( int i = 0; i <= 10; i++ )
{
printf("Enter the %ith number: ", i);
scanf("%f", &values[i]);
printf("\n");
}
}
и вывод просто:
Enter the 0th number:
Enter the 1th number:
Enter the 2th number:
Enter the 3th number:
Enter the 4th number:
Enter the 5th number:
Enter the 6th number:
Enter the 7th number:
Enter the 8th number:
Enter the 9th number:
Enter the 10th number:
, не давая возможности для пользовательского ввода.Есть ли способ сделать это ядро Jupyter C?