奥里给,干就完了

1

#include<stdio.h>
int main()
{
	float a,b;    
	printf("输入华氏温度f="); 
	scanf("%f",&b);
	a=5.0/9*(b-32);    
	printf("输出摄氏温度c=%.2f\n",a);
	return 0;
}

2

#include<stdio.h>
int main()
{
	int x,y;
	printf("输入x的值:");
	scanf("%d",&x);
	if(x<5){
		x>0?(y=x):(y=0-x);
	}
	if(x>=5&& x<15){
		y=x*x+6;
	}
	if(x>=15){
		y=x-10;
	}
	printf("y=%d",y);
	return 0;
}

3

#include<stdio.h>
#define  sl  5
int main()
{
    int create[sl];
    int prjo;
    int one;
    int two;
    int three;
    printf("输入实数:\n");
    for(int x=0;x<sl;x++){
    	printf("输入第%d个实数:",x+1);
    	scanf("%d",&create[x]);
	}
    for(int y=0;y<sl;y++){
    if(create[y]==0){
    	++three;
	}
	create[y]>0?++one:++two;
	}
	printf("正数:%d\n负数:%d\n等于零:%d",one,two,three);
	return 0;
}

#include<stdio.h>
#define  sl  5
int main()
{
   int max=0;
   for(int x=1;x<100;x=x+2){
   	printf("%d\n",x);
    	max=max+x;
   }
   printf("max=%d",max);
	return 0;
}

5

#include<stdio.h>
#define  sl  5
int main()
{
   int max=1;
    for(int x=1;x<11;x++){
    	max=max*x;
	}
	printf("%d",max);
	return 0;
}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

爷可是个天才

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值