acm网站练习题
不过五十步笑百步
这个作者很懒,什么都没留下…
展开
-
1474 查询记录(结构体专题)
代码如下: #include<stdio.h> #include<string.h> struct check { char num[100]; char name[50]; int s1,s2,s3; char num2[100]; }; int main() { int n; scanf("%d",&n); struct check s[n],t; int i; for(i=0;i<n;i++) {原创 2022-01-27 11:18:16 · 514 阅读 · 0 评论 -
1397 火车票退票费问题(函数专题)
代码如下: #include<stdio.h> #include<stdlib.h> double tpf(double prise) { double e; int t; t=prise*0.05*100; if((t%100)<25) { t=t/100*100; } else if((t%100)>=25&&(t%100)<=75) { t=t/原创 2022-01-27 11:16:09 · 395 阅读 · 0 评论 -
1322 I Love 闰年 闰年问题
#include<stdio.h> int main() { int n; scanf("%d",&n); if((n%4==0&&n%100!=0)||n%400==0) { printf("Yes\n"); } else { printf("No\n"); } return 0; }原创 2022-01-27 11:13:16 · 408 阅读 · 0 评论