#include <stdio.h>
int main()
{
int n,i,a,sum=;
printf("输入几个数:");
scanf("%d",&n);
for(i=;i<=n;i++)
{
printf("输入你所输入的数:");
scanf("%d",&a);
if(a%!=)
{
sum=sum+a;
}
}
printf("n个奇数的和为: %d",sum);
return ;
}
#include <stdio.h>
double mypow(double x,int n)
{
int i;
for(i=;i<n;i++)
mypow*=x;
}
int mian()
{
int i,n;
double mypow=1.0,x;
printf("输入x和n:");
scanf("%lf%d",&x,&n);
mypow*=x;
printf("%.2f\n",mypow(double x,int n));
return ;
}
#include<stdio.h>
double cylinder(double r,double height)
{
double v;
v=3.14*r*r*height;
return v;
}
int main()
{
double result,r,height;
printf("输入半径r的值:");
scanf("%lf",&r);
printf("输入高height的值:");
scanf("%lf",&height);
result=cylinder(r,height);
printf("圆柱体积为%lf",result);
return ;
}