C语言编程 TC2.0 高手进..200分数学计算程序
发布网友
发布时间:2024-10-06 23:05
我来回答
共4个回答
热心网友
时间:2024-10-22 08:49
我发给你了,你看看行不行
热心网友
时间:2024-10-22 08:55
有求必应,综合的:
#include <stdio.h>
main()
{
int a,b;
int c[] = {1,2,3,4,5,6,7,8,9,10};
int i,sum;
scanf("%d%d", &a,&b);
printf("%d*%d=%d",a,b,a*b);
scanf("%d", &a);
printf("%d is %s",a,a&1?"odd":"even");
for(i=0;i<10;i++)
sum+=c[i];
printf("average is:%f",(float)sum/10);
}
热心网友
时间:2024-10-22 08:51
好简单的题 200分 -_-|||
热心网友
时间:2024-10-22 08:53
5:
#include "stdio.h"
main()
{
int a,b,c;
scanf("%d,%d",&a,&b);
c=a*b;
printf("%d*%d=%d",a,b,c);
}
6:
#include "stdio.h"
main()
{
int a;
int decide(int a);
scanf("%d", &a);
if (decide (a))
printf("%d is OuShu");
else
printf("%d is JiShu");
}
int decide(int a)
{
if(a%2) return 0;
else return 1;
}
7:
#include "stdio.h"
main()
{
int i,j,k;
float Aver;
int sum=0;
printf("How much numbers will you compute?\n");
scanf("%d",&j) ;
for (i=1;i<=j;i++)
{
scanf("%d,",&k);
sum=sum+k;
}
Aver=sum/j;
printf("Aver is %f",Aver);
}