目录
实践出真知:
输出描述:
解题思路:
解题代码:
我是大V:
输出描述:
备注:
解题思路;
解题代码:
有容乃大:
输入描述:
输出描述:
解题思路:
解题代码:
实践出真知:
实践出真知https://www.nowcoder.com/practice/9273504dbe6f4c5a92b75854faca5f45?tpId=107&&tqId=33282&rp=1&ru=/ta/beginner-programmers&qru=/ta/beginner-programmers/question-ranking于老师经常告诉我们“学习编程最好的办法就是上机实践,因为你要对计算机下指令,想让计算机帮你干活,就得多和计算机‘交流’,实践才能出真知。”
输入描述:
无输出描述:
Practice makes perfect!解题思路:
题目中没有输入要求,只要求输出 Practice makes perfect!,故只需要将Practice makes perfect!打印输出即可!解题代码:
#includeint main() { printf("Practice makes perfect!"); return 0; }
我是大V:
我是大Vhttps://www.nowcoder.com/practice/5cd9598f28f74521805d2069ce4a108a?tpId=107&&tqId=33287&rp=1&ru=/ta/beginner-programmers&qru=/ta/beginner-programmers/question-ranking每个人都想成为大V (VIP:Very Important Person),但要一点一点积累才行,先从小v做起。要求输出 由小写字母v组成的大V
输入描述:
无
输出描述:
v v
v v
v
备注:
换行使用转义字符‘n’
解题思路;
题目中没有输入要求,只要求输出!,故只需要将要求打印输出即可!
值得注意的是题目中要求的n的使用
解题代码:
#include
{
printf("v vn");
printf(" v vn");
printf(" vn");
return 0;
}
有容乃大:
有容乃大https://www.nowcoder.com/practice/4712159bbc15417086d40d6c6ff94fee?tpId=107&&tqId=33284&rp=1&ru=/ta/beginner-programmers&qru=/ta/beginner-programmers/question-ranking
确定不同整型数据类型在内存中占多大(字节),输出不同整型数据类型在内存中占多大(字节)。
输入描述:
无
输出描述:
不同整型数据类型在内存中占多大(字节),具体格式详见输出样例,输出样例中的?为不同整型数据类型在 内存中占的字节数。输出样例如下:
The size of short is ? bytes.
The size of int is ? bytes.
The size of long is ? bytes.
The size of long long is ? bytes.
解题思路:
同样题目中并没有要求输入
本题的关键是求所占字节数
这里我们要用到C语言中的sizeof操作符
//sizeof-计算不同数据类型所占内存空间的大小,单位是字节
解题代码:
#include
int main()
{
printf("The size of short is %d bytes.n", sizeof(short));
printf("The size of int is %d bytes.n", sizeof(int));
printf("The size of long is %d bytes.n", sizeof(long));
printf("The size of long long is %d bytes.n", sizeof(long));
return 0;
}
我是大Vhttps://www.nowcoder.com/practice/5cd9598f28f74521805d2069ce4a108a?tpId=107&&tqId=33287&rp=1&ru=/ta/beginner-programmers&qru=/ta/beginner-programmers/question-ranking每个人都想成为大V (VIP:Very Important Person),但要一点一点积累才行,先从小v做起。要求输出 由小写字母v组成的大V
输入描述:
无输出描述:
v v v v v
备注:
换行使用转义字符‘n’
解题思路;
题目中没有输入要求,只要求输出!,故只需要将要求打印输出即可!
值得注意的是题目中要求的n的使用
解题代码:
#include
{
printf("v vn");
printf(" v vn");
printf(" vn");
return 0;
}
题目中没有输入要求,只要求输出!,故只需要将要求打印输出即可! 值得注意的是题目中要求的n的使用解题代码:
#include{ printf("v vn"); printf(" v vn"); printf(" vn"); return 0; }
有容乃大https://www.nowcoder.com/practice/4712159bbc15417086d40d6c6ff94fee?tpId=107&&tqId=33284&rp=1&ru=/ta/beginner-programmers&qru=/ta/beginner-programmers/question-ranking
确定不同整型数据类型在内存中占多大(字节),输出不同整型数据类型在内存中占多大(字节)。
输入描述:
无输出描述:不同整型数据类型在内存中占多大(字节),具体格式详见输出样例,输出样例中的?为不同整型数据类型在 内存中占的字节数。输出样例如下: The size of short is ? bytes. The size of int is ? bytes. The size of long is ? bytes. The size of long long is ? bytes.解题思路:同样题目中并没有要求输入 本题的关键是求所占字节数 这里我们要用到C语言中的sizeof操作符 //sizeof-计算不同数据类型所占内存空间的大小,单位是字节解题代码:
#includeint main() { printf("The size of short is %d bytes.n", sizeof(short)); printf("The size of int is %d bytes.n", sizeof(int)); printf("The size of long is %d bytes.n", sizeof(long)); printf("The size of long long is %d bytes.n", sizeof(long)); return 0; }
每天都要进步一点点┗|`O′|┛ 嗷~~



