能力值:
( LV2,RANK:10 )
|
-
-
2 楼
#include <iostream>
int main()
{
int theFirstValue, theSecondValue;
std::cout << "please input two integers:";
std::cin >> theFirstValue >> theSecondValue;
// 保证theFirstValue为小的
if (theFirstValue > theSecondValue)
{
int temp = theFirstValue;
theFirstValue = theSecondValue;
theSecondValue = temp;
}
int i = theFirstValue;
while (i <= theSecondValue)
{
std::cout << i << ' ';
if (((i - theFirstValue + 1) % 10) == 0)
std::cout << std::endl;
i++;
}
return 0;
}
呵呵,看看这样行吗~~
|
能力值:
( LV2,RANK:10 )
|
-
-
3 楼
3Q
学习了...
|
|
|