最赞回答 / 离乡的猫
#include <stdio.h>int main() { int year = 2014; //今年是2014年 if((year%4 == 0 && year%100 != 0) || year%400==0)//补全一下代码 { printf("今年是闰年"); } else { printf("今年是平年"); } return 0;}
2021-01-23
最赞回答 / weixin_慕设计3160937
#include <stdio.h>int main() { int height = 185; //补全所有代码 if(height >= 180) { printf("%s\n"," 恭喜小明可以参加校篮球队 "); } else { printf("%s/n","小明不能参加校篮球队"); } return 0;}
2021-01-23
最赞回答 / Tinkous
需要定义,题目的问题,不定义会有提示:
hello.c: In function 'getPeachNumber': hello.c:2:5: warning: type of 'n' defaults to 'int' [-Wimplicit-int] int getPeachNumber(n)return dg((i+1)+1)*2 不对,应该是return (dg(i+1)+1)*2 ;括号位置不对,递归的是i+1,不是(i+1)+1
2021-01-21