·¢²¼Ê±¼ä:2024-01-06 15:13:44 ÎÄÕÂÀ´Ô´:»¥ÁªÍø
΢²© ΢ÐÅ QQ¿Õ¼ä

±à³ÌÉèÒøÐдæ¿îµÄÄêÀûÂÊ ÀûÓÃCÓïÑÔ¼ÆËã´æ¿î±¾ÀûÖ®ºÍ

½ñÌìС±àÀ´Îª´ó¼Ò½â´ð±à³ÌÉèÒøÐдæ¿îµÄÄêÀûÂÊÕâ¸öÎÊÌ⣬ÀûÓÃCÓïÑÔ¼ÆËã´æ¿î±¾ÀûÖ®ºÍºÜ¶àÈË»¹²»ÖªµÀ£¬ÏÖÔÚÈÃÎÒÃÇÒ»ÆðÀ´¿´¿´°É£¡

ÉèÒøÐж¨ÆÚ´æ¿îµÄÄêÀûÂÊrateΪ2.25%£¬ÒÑÖª´æ¿îÆÚΪnÄ꣬´æ¿î±¾½ðΪcapitalÔª£¬ÊÔ±à³Ì¼ÆËã²¢Êä³önÄêºóµÄ±¾ÀûÖ®ºÍdeposit¡£³ÌÐòÖÐËùÓи¡µãÊýµÄÊý¾ÝÀàÐ;ùΪdoubleÀàÐÍ¡£

ÉèÒøÐж¨ÆÚ´æ¿îµÄÄêÀûÂÊrateΪ2.25%£¬ÒÑÖª´æ¿îÆÚΪnÄ꣬´æ¿î±¾½ðΪcapitalÔª£¬ÊÔ±à³Ì¼ÆËã²¢Êä³önÄêºóµÄ±¾ÀûÖ®ºÍdeposit¡£³ÌÐòÖÐËùÓи¡µãÊýµÄÊý¾ÝÀàÐ;ùΪdoubleÀàÐÍ¡£#include<stdio.h>#include<math.h>intmain(){ intyear; doublerate,deposit,capital; printf("Pleaseenterrate,year,capital:\n"); scanf("%lf,%d,%lf",&rate,&year,&capital); deposit=capital*(1+rate)*pow(1+rate,year-1); printf("deposit=%.3f\n",deposit); return0;}

¹ØÓÚ±à³ÌÉèÒøÐдæ¿îµÄÄêÀûÂʵÄÄÚÈݵ½´Ë½áÊø£¬Ï£Íû¶Ô´ó¼ÒÓÐËù°ïÖú¡£

ÁíÒ»ÊÓ½Ç

»»Ò»»»