#include using namespace std; #include int main(void) { int iNum[2]; const int INPUTNUM = 2; int iStepNum = 0; cout << "a b 2つの正の整数。(1≤a,b≤10の9乗)を入力して下さい" << endl; for( int i = 0; i> iNum[i]; if( iNum[i] < 1 || iNum[i] > 1000000000) { i--; cout << "a b ともに正の整数。(1≤a,b≤10の9乗)で入力すること" << endl; } } if( iNum[1] / iNum[0] == 0 ) { iStepNum = iNum[1] / iNum[0]; } else { iStepNum = (iNum[1] / iNum[0]) + 1; } cout << iStepNum << endl; return 0; }