algorithm
dovelet - 퓨즈/fuse
블루건
2016. 7. 8. 20:08
dovelet - 퓨즈/fuse
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | #include <iostream> using namespace std; int main() { float spendDesktop = 1.5 + 1.0; float spendPrinter = 2.0; float spendRouter = 0.5; int desktopCount, printerCount, routerCount; cin >> desktopCount >> printerCount >> routerCount; int result = (spendDesktop * desktopCount + spendPrinter * printerCount + spendRouter * routerCount) * 2; result = (result + 9) / 10 * 10; cout << result << " amperes" << endl; return 0; } | cs |