* 编写一个C语言程序,模拟一个容量为20件的初级仓库。只能用用指针

问题遇到的现象和发生背景

应该有包含以下内容的项目。

    • 名称
    • 文章编号(字母数字)。
    • 文章的数量
  • -价格

  • 仓库应包含

    • 项目
    • 仓库里有多少不同的物品
  • 该方案还应该提供以下功能。

    • 创建一个新项目
    • 所有文章的输出
  • 每项功能都要在一个单独的函数中定义。此外,选择选项要以菜单形式显示。

  • 注意:不要使用sdtio.h以外的任何库!
    你可以使用以下内容作为模板
    #define MAXcharacter 1000

#define MAXarticle 10

#include <stdio.h>

问题相关代码,请勿粘贴截图
运行结果及报错内容
我的解答思路和尝试过的方法
我想要达到的结果

#define MAXarticle_number 20
#define MAXarticle_name 20
#define MAXarticle 10
#include<stdio.h>

int i = 0;
void Others()
{
    printf("自定义");
}
void Create_the_project(char name[MAXarticle][MAXarticle_name], char number[MAXarticle][MAXarticle_number], int num_article_price[MAXarticle][2])
{

    if (i < MAXarticle)
    {
        printf("name: ");
        scanf("%s", name[i]);
        printf("number:");
        scanf("%s", number[i]);
        printf("num_article:");
        for (int j = 0; j < 2; j++)
        {
            scanf("%d", &num_article_price[i][j]);
            if(j<1)
             printf("price:");

        }
    }
    i++;
}
void in_menu()
{
    printf("1.新建项目\n");
    printf("2.others\n");
    printf("0.返回\n");
}
void Enter_the_warehouse(char name[MAXarticle][MAXarticle_name],char number[MAXarticle][MAXarticle_number],int num_article_price[MAXarticle][2])
{
    int input = 0;
    

        in_menu();
        printf("请输入你的选择;");
        scanf("%d",&input);
        switch (input)
        {
        case 1:
            Create_the_project(name, number, num_article_price);
            break;
        case 2:
            Others();
            break;
        case 0:
            printf("返回");
            break;
        default:
            printf("请重新输入:1/0   ");

        }
    
}
void menu()
{
    printf("***********************************************\n");
    printf("***1.创建一个新项目  2.输出所有文章 0.退出*****\n");
    printf("***********************************************\n");

}
void All_print(char name[MAXarticle][MAXarticle_name], char number[MAXarticle][MAXarticle_number], int num_article_price[MAXarticle][2])
{
    int k = 0;
    if (k < i)
    {
        for (k = 0; k < i; k++)
        {
            int h = 0;
            printf("%s  ", name[k]);
            /*for (h = 0; h < MAXarticle_number; h++)*/
                printf("  %s  ", number[k]);
            for (h = 0; h < 2; h++)
                printf("  %d   ", num_article_price[k][h]);
            printf("\n");
            
        }
    }
    else printf("请先存入文章\n");
}
int main()
{
    char name[MAXarticle][MAXarticle_name] = { 0 };
    char number[MAXarticle][MAXarticle_number] = { 0 };
    int num_article_price[MAXarticle][2] = { 0 };
    int input = 0;
    do
    {
        
        menu();
        printf("请输入选择:1/0   ");
        scanf("%d", &input);
        switch (input)
        {
        case 1:
            Enter_the_warehouse(name,number, num_article_price);
            break;
        case 2:
            All_print(name, number, num_article_price);
            break;
        case 0:
            printf("退出程序");
            break;
        default:
            printf("请重新输入:1/0   ");

        }
    } while (input);
    return 0;
}


用结构体更方便