填写C 程序中缺少的位置以获取所需的输出
fill missing places in c++ program to get desired output
用适当的关键字填充空白,根据测试用例获得所需的输出。(语言使用C )
样本测试用例
input output
Test Case 1 4 square = 16, ++ square = 25
test case 2 -8 square =64, ++ square = 49
#include <iostream>
using namespace std;
______ int SQUARE(int x) { ______ x * x; }
int main() {
int a , b, c;
cin >> a ;
b = SQUARE(a);
cout << "Square = " << b << ", ";
c = SQUARE(++a);
cout << "++ Square = " << c ;
return 0;
}
第二个空白处是"返回"
首先可能是"内联"或什么都没有
相关文章:
- 从 c++ 中的实例化进程获取输出的可靠方法是什么?
- 获取C++输出流中元素的大小
- 无法在同一行上获取输出,在 C++ 中两个输出之间有空格
- 在Qt中获取输出:'QProcess::start()'和'QProcess:readAllStandardOutPut()'
- 从 exe 获取输出C++并在 Python 中实时处理它
- 通过 API 填写"std::optional"<T>,获取输出"T*"参数
- 从创建进程创建的进程获取输出
- 从C++中的文件加载的数组中获取输出
- C 和R接口,获取输出
- 无法从"g++"调用获取输出结果
- 如何在更新语句中获取输出子句的结果
- 无法获取输出文件以从 infile 读取数据(c++)
- 在 Objective-C 中调用一个C++程序(带有参数)并获取输出
- 从终端运行C++程序.在同一终端窗口中获取输出
- 获取输出并将其存储到变量中
- Visual Studio:如何在"Win32"项目中获取输出
- 无法从我的 c++ 应用程序获取输出
- 获取c#输出字符串参数值为c++ BSTR*
- Std::cout, ostream和其他类型的获取输出流
- c++ IBM i Access API运行远程命令并获取输出