#include<stdio.h>
#include<math.h>
int main()
{
float x, y;
scanf_s("%f", &x);
if (x >= 0)
y = sqrt(x);
else
y = pow(x, 5) + 2 * x + 1 / x;
printf(“x=%.2f,y=%.2f\n”, x, y);
return 0;
}#include<stdio.h>
int main()
{
int year,leap;
printf(“输入年份:”);
scanf_s("%d",&year);
if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
leap = 1;
else
leap = 0;
if (leap)
printf("%d是闰年\n", year);
else
printf("%d不是闰年\n", year);
return 0;
}#include<stdio.h>
int main()
{ int year, leap;
printf(“输入年份:”);
scanf_s("%d", &year);
if (year %4 == 0)
{ if (year % 100 == 0)
{ if (year % 400 == 0)
leap = 1;
else
leap = 0;
}
else
leap = 1;
}
else
leap = 0;
if (leap)
printf("%d是闰年\n", year);
else
printf("%d不是闰年\n", year);
return 0;
}int main()
{
int year, leap;
printf(“输入年份:”);
scanf_s("%d", &year);
if (year % 4 != 0)leap = 0;
else if (year % 100 != 0)
leap = 1;
else if (year % 400 != 0)
leap = 0;
else
leap = 1;
if
(leap)
printf("%d是闰年\n", year);
else
printf("%d不是闰年\n", year);
return 0;
}#include<stdio.h>
int main()
{
int n, a, b, c;
printf(“输入一个三位整数:”);
scanf_s("%d", &n);
if (n < 100 || n>999)
printf(“输入错误!\n”);
else
{
a = n / 100;
b = n / 10 % 10;
c = n % 10;
if (a < b && b < c)
printf("%d是升序数\n", n);
else
printf("%d不是升序数\n", n);
}
return 0;
}