當前位置:編程學習大全網 - 編程軟體 - 幫忙做下程序上作業

幫忙做下程序上作業

妳太懶了.嘿嘿

第壹題,看圖片

第二題:

n?n/10

第三題:

#include?<stdio.h>

#include?<string.h>

int?main()

{

char?strInput[255];

int?i=0;

int?nLength,nLow,nUpp;

nLength=0;nLow=0;nUpp=0;

scanf("%s",strInput);

nLength=strlen(strInput);

printf("所有字符數:%d\n",nLength);

do

{

char?sTemp=strInput[i];

if?(sTemp>=97?&&?sTemp<=122)

nLow++;

if?(sTemp>=65?&&?sTemp<=90)

nUpp++;

i++;

}?while?(i<nLength);

printf("小寫字母數:%d\n",nLow);

printf("大寫字母數:%d\n",nUpp);

return?0;

}

第四題:

#include<stdio.h>

int?main()

{

int?p[10];

int?i,ave,sum=0,t=0,flag=0;

for(i=0;i<10;i++)

{

scanf("%d",&p[i]);

sum+=p[i];

if(p[i]>=60)?t++;

}

ave=sum/10;

for(i=0;i<10;i++)

if(p[i]>ave)?flag++;

printf("平均成績:%d\n及格人數:%d\n高於平均分人數:%d\n",ave,t,flag);

return?0;

}

樓主這可都是我辛辛苦苦自己做的哦!

  • 上一篇:Masm編程
  • 下一篇:如果妳想學習,妳應該學習什麽技能?
  • copyright 2024編程學習大全網