Write a C program that asks for your full name (e.g.Oliver Twist),followed by your student ID num

Write a C program that asks for your full name (e.g.Oliver Twist),followed by your student ID num

题目
Write a C program that asks for your full name (e.g.Oliver Twist),followed by your student ID num
Write a C program that asks for your full name (e.g.Oliver Twist),followed by your
student ID number (e.g.8888888) and then prints your full name and student ID number
in the following format:
Your name is:Oliver Twist.
Your student ID is:8888888.
以下是我编的程序
void main()
{
char name[40];
number[40];
printf("What is your full name? ");
scanf("%s",name);
printf("What is your student ID number? " );
scanf("%s",number);
printf("Your full name is:%s ,Your student ID:%s",name,number);
为啥电脑不能运行?
答案
number 输出的是 %d 是数字 而s 代表的字母 还有一点就是scanf函数 输入时必须是这样的scanf("%s",&number);&必不可少!你也是西利的不?你还交作业了?那个 我今天看课件 才发现 其实 name的那个 输入不应该用scanf 应...
举一反三
已知函数f(x)=x,g(x)=alnx,a∈R.若曲线y=f(x)与曲线y=g(x)相交,且在交点处有相同的切线,求a的值和该切线方程.
我想写一篇关于奥巴马的演讲的文章,写哪一篇好呢?为什么好
奥巴马演讲不用看稿子.为什么中国领导演讲要看?
想找英语初三上学期的首字母填空练习……
英语翻译
最新试题
热门考点

超级试练试题库

© 2017-2019 超级试练试题库,All Rights Reserved.