why cant my printf pick up my user input?

前端 未结 2 2008
花落未央
花落未央 2021-01-16 16:42

I have this

void main(int argnum, char** input)
{
   int a=0, b=0, c=0, d=0, e=0, f=0, g=0, h=0, i=0, j=0, k=0, l=0, m=0, n=0, o=0, p=0;

   printf("Ente         


        
2条回答
  •  猫巷女王i
    2021-01-16 17:12

    #include
    void main(int argnum, char** input)
    {
       int a=0, b=0, c=0, d=0, e=0, f=0, g=0, h=0, i=0, j=0, k=0, l=0, m=0, n=0, o=0, p=0;
    
       printf("Enter the numbers from 1 to 16, in any order(separate by comma) : ");
    
       scanf("%d" "%d" "%d" "%d" "%d" "%d" "%d" "%d" "%d" "%d" "%d" "%d" "%d" "%d" "%d" "%d", &a, &b, &c, &d, &e, &f, &g, &h, &i, &j, &k, &l, &m, &n, &o, &p);
       printf("%d " "%d " "%d " "%d \n", a, b, c, d);
       printf("%d " "%d " "%d " "%d \n", e, f, g, h);
       printf("%d " "%d " "%d " "%d \n", i, j, k, l);
       printf("%d " "%d " "%d " "%d \n", m, n, o, p); 
      
    } 
    

    after taking each value from the keyboard please press enter button it will work with this code

提交回复
热议问题