程序设计基础
任务描述: 输出爱迪生的名言。
代码实现:
cpp
#include <stdio.h>
int main() {
printf("Edison said: \"A strong man will struggle with the storms of fate.\"");
return 0;
}
输出结果: 完美地按照要求输出了爱迪生的名言。
学习心得:
通过这个简单的编程任务,我复习了C++的基本语法,特别是printf函数的使用。
这个任务也让我意识到,即使是简单的字符串输出,也需要仔细检查引号和格式,以确保输出的准确性。
代码实现:
cpp
#include <stdio.h>
int main() {
printf("Edison said: \"A strong man will struggle with the storms of fate.\"");
return 0;
}
输出结果: 完美地按照要求输出了爱迪生的名言。
学习心得:
通过这个简单的编程任务,我复习了C++的基本语法,特别是printf函数的使用。
这个任务也让我意识到,即使是简单的字符串输出,也需要仔细检查引号和格式,以确保输出的准确性。
全部评论
好强,竟然能轻松通过运行
相关推荐
01-02 11:44
门头沟学院 C工程师 点赞 评论 收藏
分享
美的集团公司福利 852人发布