multiples.cpp
来自「C++上机课的习题答案」· C++ 代码 · 共 31 行
CPP
31 行
// multiples.cpp
//判断第一个整数是否为第二个整数的的倍数。
//提示:用求余符号%
#include <iostream>
using std::cout;
using std::cin;
using std::endl;
int main()
{
/* Write variable declarations(变量声明) here */
cout << "Enter two integers: ";
/* Write a cin statement to read data into variables here */
if ( /* Write a condition that tests if number1 is a multiple of
number2 */ )
cout << number1 << " is a multiple of " << number2 << endl;
if ( /* Write a condition that tests if num1 is not a multiple
of num2 */ )
cout << number1 << " is not a multiple of " << number2 << endl;
system("PAUSE");
return 0;
} // end main
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?