代码拉取完成,页面将自动刷新
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
//
//int main() {
// float c;
// int m, d, y;
// scanf("%f %d %d %d", &c, &m, &d, &y);
// if (m == 11 && d == 11 && y == 1)
// {
// c = c * 0.7 - 50;
// if (c < 0)
// c = 0;
// printf("%.2f", c);
// }
// else if (m == 11 && d == 11 && y == 0)
// {
// printf("%.2f", c * 0.7);
// }
// else if (m == 12 && d == 12 && y == 1)
// {
// c = c * 0.8 - 50;
// if (c < 0)
// c = 0;
// printf("%.2f", c);
// }
// else if (m == 12 && d == 12 && y == 0)
// {
// printf("%.2f", c * 0.8);
// }
// return 0;
//}
#include<math.h>
//int main()
//{
// float a = 0.6;
// printf("%d\n", (int)fabs(a));
//
// return 0;
//}
int main()
{
int arr[10];
for (int i = 0; i < 10; i++)
{
scanf("%d", &arr[i]);
}
int i = 0;
int j = 0;
for (i = 0; i < 10; i++)
{
for (j = 0; j < 10 - i - 1; j++)
{
if (arr[j] > arr[j + 1])
{
int t = arr[j];
arr[j] = arr[j + 1];
arr[j + 1] = t;
}
}
}
for (int i = 0; i < 10; i++)
{
printf("%d ", arr[i]);
}
return 0;
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。