#include<myhead.h>
void fun(int n)
{
if(n>9)
{
fun(n/10);
printf("%d\t",n%10);
putchar(10);
return;
}
else
{
printf("%d\n",n%10);
return;
}
}
int main(int argc, const char *argv[])
{
int num;
printf("请输入一个整数:");
scanf("%d",&num);
fun(num);
return 0;
}
#include<myhead.h>
void fun(int n)
{
if(n>0)
{
fun(n/2);
printf("%d",n%2);
}
}
int main(int argc, const char *argv[])
{
int num;
printf("请输入一个数:");
scanf("%d",&num);
fun(num);
putchar(10);
return 0;
}
#!/bin/bash
head -5 /etc/group | tail -1
mkdir /home/ubuntu/copy
cd /home/ubuntu/copy
sudo cp /etc/shadow /home/ubuntu//copy/test
sudo chown root /home/ubuntu//copy/test
sudo chmod o-w,o-r,o-x /home/ubuntu//copy/test
ubuntu@ubuntu:~/23051/C高级/day2$