#include<stdio.h>
int main()//三个数的大小
#include<stdio.h>
int main()//车速
#include<stdio.h>
int main()//倒三角形 不知道为啥就是打不出来
{
int i,j,k;
for(i=1;i<=10;i++)
{for(j=0;j<=9;j++)
printf(" ");
for(k=10;k=11-i;)
printf("*");
printf("\n");}
return 0;
{ printf("请输入车道:");
scanf("%c",&channel);
int maxspeed,speed,channel;
if(channel=='A')
maxspeed=100;
else if(channel='B')
maxspeed=110;
else
maxspeed=120;
if(speed<maxspeed)
printf("正常行驶!\n");
else if(speed<maxspeed*1.1)
if(channel=='A')
{
if(speed<100)
{
printf("正常行驶!");
}
else if(speed<110)
printf("超速10%以内,罚款两百元!");
else if(speed<maxspeed*1.5)
printf("超速10%~50%,扣十分");
else
printf("严重超速,吊销执照!");
if(channel=='A')
{
if(speed<100)
{
printf("正常行驶");
}
else if(speed<110)
{
printf("超速10%以内,罚款200元!");
}
else if(speed<maxspeed*1.5)
printf("超速10%~50%,扣十分");
else
printf("严重超速,吊销执照!");
}
}
}
{ int a,b,c,temp;
printf("请输入三个整数:\n");
scanf("%d %d %d",&a,&b,&c);
{if(a>b>c)
temp=a;
a=c;
c=temp;
}
{
if(c>a>b)
temp=a;
a=b;
b=temp;
}
{
if(a>c>b)
temp=a;
a=b;
b=c;
c=temp;
}
{
if(a<c<b)
temp=b;
b=c;
c=temp;
}
{
if(c<a<b)
temp=c;
c=b;
b=a;
a=temp;
}
printf("这三个数从小到大的顺序为:%d %d %d\n",a,b,c);
return 0;
}