#include <stdio.h>
#include <string.h>
#include <stdlib.h>
void fun(int num);
int main(int argc, char *argv[])
{
int num;
printf("请输入一个数:");
scanf("%d", &num);
fun(num);
putchar(10);
return 0;
}
void fun(int num)
{
if (num == 0)
{
return;
}
fun(num / 10);
printf("%d ", num % 10);
}
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
void fun(int num);
int main(int argc, char *argv[])
{
int num;
printf("请输入一个数:");
scanf("%d", &num);
fun(num);
putchar(10);
return 0;
}
void fun(int num)
{
if (num == 0)
{
return;
}
printf("%d", num % 2);
fun(num / 2);
}
#!/bin/bash
head -5 /etc/group | tail -1
mkdir /home/ubuntu/copy
cd /home/ubuntu/copy
sudo cp /etc/shadow ./test
sudo chown root:ubuntu test
sudo chmod o-w,o-r,o-x test