Last active
August 29, 2015 14:00
-
-
Save ustreamer-01647/11163560 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Product Version: NetBeans IDE 7.4 (Build 201310111528) | |
更新: NetBeans IDEはバージョンNetBeans 7.4 Patch 3に更新されます | |
Java: 1.7.0_51; Java HotSpot(TM) 64-Bit Server VM 24.51-b03 | |
Runtime: Java(TM) SE Runtime Environment 1.7.0_51-b13 | |
System: Windows 7 version 6.1 running on amd64; MS932; ja_JP (nb) | |
run: | |
必要たこ足:60 | |
必要小麦粉:20 | |
ビルド成功(合計時間: 0秒) | |
*/ | |
package q769; | |
/** | |
* | |
* @author paul | |
*/ | |
public class Q769 { | |
private static final int たこ焼き単価 = 400; // 1パックあたり販売価格(円) | |
private static final int たこ焼き容量 = 6; // 1パックあたりたこ焼き個数 | |
private static final int たこ足容量 = 10; // 1本あたりたこ焼き個数 | |
private static final int 小麦粉容量 = 30; // 1キロあたりたこ焼き個数 | |
/** | |
* | |
* @param 売上予定 目標売上(円) | |
*/ | |
private static void put仕入れ量(double 売上予定) { | |
double 必要売上数 = Math.ceil(売上予定 / たこ焼き単価); | |
System.out.println("必要たこ足:" + (int) Math.ceil(必要売上数 * たこ焼き容量 / たこ足容量)); | |
System.out.println("必要小麦粉:" + (int) Math.ceil(必要売上数 * たこ焼き容量 / 小麦粉容量)); | |
} | |
/** | |
* @param args the command line arguments | |
*/ | |
public static void main(String[] args) { | |
put仕入れ量(40000); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment