scanf()函数, 链表的参数,数组的参数

链表的参数只有一个,就是头结点,头结点知道了,整个链表就能确定了。

确定数组需要首地址,并且还需要知道数组的长度。

//object: scanf函数的一点理解
//writer: mike
//time: 2020,08,25


#include<stdio.h>
#include<stdlib.h>

int main()
{
    int a, b, c;
    printf("please input you number(three) :\n");
    // 这里空白字符会被当做数字的间隔符,比如,空格,回车,tab
    scanf("%d%d%d",&a, &b, &c);
    printf("the number is :%d,%d,%d\n",a, b, c);
    printf("please input three number again: \n");
    // 这里,三个变量再次被利用
    //这里,只允许逗号作为数字之间的分割字符
    scanf("%d,%d,%d", &a,&b,&c);
    printf("the number is :%d,%d,%d\n", a, b, c);
    system("pause");
    return 0;
}

 

 

 

//object: scanf函数的一点理解
//writer: mike
//time: 2020,08,25


#include<stdio.h>
#include<stdlib.h>

int main()
{
    int abc;
    printf("please input you number(three) :\n");
    // 这里空白字符会被当做数字的间隔符,比如,空格,回车,tab
    scanf("%d%d%d",&a, &b, &c);
    printf("the number is :%d,%d,%d\n",abc);
    printf("please input three number again: \n");
    // 这里,三个变量再次被利用
    //这里,只允许逗号作为数字之间的分割字符
    scanf("%d,%d,%d", &a,&b,&c);
    printf("the number is :%d,%d,%d\n"abc);
    system("pause");
    return 0;
}
posted @ 2020-08-25 23:57  看星星的派大星  阅读(362)  评论(0编辑  收藏  举报