game-engineer:classes:2022:game-programing-2:first-term:1:01-16-xx04

#include <iostream>
 
using namespace std;
 
int main() {
	int cap, n, result;
	cin >> n >> cap;
	if((n < 0 || n > 9999) || (cap < 1 || cap > 20))
	{
		cout << "Error" << endl;		
	}else
		if(n % cap)
		{
			cout << n/cap + 1;
		}else
			cout << n/cap;
}
  • game-engineer/classes/2022/game-programing-2/first-term/1/01-16-xx04.txt
  • 最終更新: 3年前
  • by root