first commit

master
2228628942@qq.com 6 years ago
commit 31e75df540

@ -0,0 +1,18 @@
#include<stdio.h>
int main(void)
{/*
int a = 40;
a >= 60 ? printf("及格") : printf("不及格");*/
// 条件if的语句:else的语句
int a = 40;
if (a >= 60 && a <= 100)
{
printf("及格");
}
else
{
printf("不及格");
}
return 0;
}

@ -0,0 +1,20 @@
#include<stdio.h>
void solve(int n) {
int temp = n % 10;
/*********Begin*********/
n /= 10;
if (n > 0) solve(n);
/*********End**********/
if (n)
printf(" %d", temp);
else
printf("%d", temp);
}
int main(void)
{
//freopen("in.txt","r",stdin);
int n;
scanf("%d", &n);
solve(n);
return 0;
}
Loading…
Cancel
Save