15 条题解
-
0
《下划线之歌》
#include<iostream> using namespace std; #define __________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________ int #define _______________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________ cin #define ____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________ cout __________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________ main() { __________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________ ___________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________; _______________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________>>___________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________; ____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________<<"I'm "<<___________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________<<" years old."; }
-
0
几岁了
题意:
输出一个数n,输出“I'm” n(变量) “years old”
思路:
初始化 → 定义变量 → 外部输入赋值给变量 → 输出“文字” + 变量 + “文字” → 结束
题解:
#include <iostream> //导入输入输出库 using namespace std; //使用标准名称定义 int main() //主函数 { int a; //定义变量 cin >> a; //外部输入赋值给变量 cout << "I'm" << a << " years old."; //输出 return 0; //程序结束 }
强调:注意空格!注意空格!!注意空格!!!
- 1
信息
- ID
- 74
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 6
- 标签
- 递交数
- 8887
- 已通过
- 2817
- 上传者