December 31, 2010

c語言程式 國英數成績平均的計算


#include
#include
int main (void)
{
    float f,a,b,c;
    printf("請輸入國文成績:");
    scanf("%f",&a);
    printf("請輸入英文成績:");
    scanf("%f",&b);
    printf("請輸入數學成績:");
    scanf("%f",&c);
    f=(a+b+c)/3.0; 
    printf("平均分數=%f",f);
    scanf("%f",&f);
    
    system("pause");
    return 0;
}

0推薦此文章
Today's Visitors: 0 Total Visitors: 80
Personal Category: c語言程式 Topic: learning / education / linguistic
Previous in This Category: c程式語言 停車場費率   Next in This Category: c語言程式 算面積
[Trackback URL]

Reply
  • ....

  • Blog Owner at March 29, 2011 06:47 PM Reply
Post A Comment









Yes No



Please input the magic number:

( Prevent the annoy garbage messages )
( What if you cannot see the numbers? )
Please input the magic number

誰來收藏
Loading ...
unlog_NVPO 0