jQuery¼¼Êõ

02:²ÆÎñ¹ÜÀí

×ÖºÅ+ ×÷ÕߣºH5Ö®¼Ò À´Ô´£ºH5Ö®¼Ò 2017-09-11 09:56 ÎÒÒªÆÀÂÛ( )

02:²ÆÎñ¹ÜÀí

Ô­ÌâÁ´½Ó

×Üʱ¼äÏÞÖÆ: 1000ms ÄÚ´æÏÞÖÆ: 65536kBÃèÊö

Larry½ñÄê±ÏÒµ²¢ÕÒµ½ÁËÒ»·Ý¹¤×÷¡£Ëû׬ºÜ¶àÇ®£¬µ«似ºõ×ÜÊDz»¹»¡£LarryÈÏΪËûÐèÒª¿ØÖÆËûµÄͶ×ÊÒÔ½â¾ö×Ô¼ºµÄ²ÆÎñÎÊÌâ¡£LarryÄõ½ÁË×Ô¼ºµÄÒøÐÐÕË»§Ïêµ¥£¬Ïë¿´¿´×Ô¼ºÓжàÉÙÇ®¡£Çë°ïÖúLarryдһ¸ö³ÌÐò£¬Í¨¹ý¹ýÈ¥12¸öÔÂÖÐÿÔµÄÔÂÄ©½áÓ࣬¼ÆËãƽ¾ù½áÓà¡£

ÊäÈëÊäÈë°üº¬12ÐУ¬Ã¿Ðаüº¬Ò»¸öÊý£¬ÎªÄ³¸öÔµĽáÓࡣÿ¸öÊý¶¼ÊDz»´óÓÚ1,000,000µÄÕýÊý£¬±£ÁôÁ½Î»Ð¡Êý£¬Ê¡ÂÔ"$"·û¡£Êä³öÊä³öÒ»¸öÊý£¬ÎªÕâ12¸öÔµÄƽ¾ùÔÂÄ©½áÓ࣬±£Áôµ½Ð¡ÊýµãºóµÚ¶þ룬²¢ÔÚ×îÇ°Ãæ¼ÓÒ»¸ö"$"·û¡£ÑùÀýÊäÈë100.00489.1212454.121234.10823.05109.205.271542.25839.1883.991295.011.75ÑùÀýÊä³ö$1581.42

Ô´Âë

#include <iostream>#include <iomanip>#include <cmath>using namespace std;int main(){ double d, avg, sum=0; for (int i=0; i<12; i++){ cin >> d; sum += d; } avg = sum/12; cout << "$" << fixed << setprecision(2) << avg << endl; return 0;}


¡¡

1.±¾Õ¾×ñÑ­ÐÐÒµ¹æ·¶£¬ÈκÎתÔصĸå¼þ¶¼»áÃ÷È·±ê×¢×÷ÕߺÍÀ´Ô´£»2.±¾Õ¾µÄÔ­´´ÎÄÕ£¬ÇëתÔØʱÎñ±Ø×¢Ã÷ÎÄÕÂ×÷ÕߺÍÀ´Ô´£¬²»×ðÖØÔ­´´µÄÐÐΪÎÒÃǽ«×·¾¿ÔðÈΣ»3.×÷ÕßͶ¸å¿ÉÄܻᾭÎÒÃDZ༭Ð޸Ļò²¹³ä¡£

Ïà¹ØÎÄÕÂ
ÍøÓѵãÆÀ
ý