请帮助我解决操作系统的这个问题
答案 0 :(得分:1)
要使用PowerShell显示文件或文件夹的访问权限,您可以使用以下内容:
#include <stdio.h>
#include <string.h>
void main()
{
int smallest, secondsmallest;
int array[100], size, i;
printf("\n How many elements do you want to enter: ");
scanf("%d", &size);
printf("\nEnter %d elements: ", size);
for (i = 0 ; i < size; i++)
scanf("%d", &array[i]);
if (array[0] < array[1]) {
smallest = array[0];
secondsmallest = array[1];
}
else {
smallest = array[1];
secondsmallest = array[0];
}
for (i = 2; i < size; i++) {
if (array[i] < smallest) {
secondsmallest = smallest;
smallest = array[i];
}
else if (smallest == secondsmallest){
smallest = secondsmallest;
secondsmallest = array[i];
}
else if (array[i] < secondsmallest && array[i] > smallest) {
secondsmallest = array[i];
}
}
printf(" \nSecond smallest element is %d\n", secondsmallest);
printf(" \n smallest element is %d\n", smallest);
}
这会给你看起来像这样的结果: