自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(12)
  • 收藏
  • 关注

原创 浙大 - PTA - 基础编程题目集:7-3 逆序的三位数 (10分)

本题链接:link本题代码:#include <stdio.h>int main(){ int number; int book[3]; scanf("%d",&number); int i=0; while(number) { book[i]=number%10; number/=10; i++; } for(i=0;i<3;i++...

2020-02-25 12:19:46 296

原创 浙大 - PTA - 基础编程题目集:7-1 厘米换算英尺英寸 (15分)

本题链接: link本题代码:#include<iostream>#include<stdio.h> using namespace std;#define MAXN 10int main(){ int cm; scanf("%d",&cm); // 输入一个正整数厘米 double m=cm*1.0/100; // 将厘米换算成米...

2020-02-25 12:15:25 359 2

原创 浙大 - PTA - 基础编程题目集:7-12 两个数的简单计算器 (10分)

#include <stdio.h>int main(){ int number1,number2; int outcome; int flag=0; char sign; scanf("%d %c %d",&number1,&sign,&number2); switch(sign) { case '+': outcome=numb...

2020-02-05 20:04:28 803

原创 浙大 - PTA - 基础编程题目集:7-11 分段计算居民水费 (10分)

#include <stdio.h>int main(){ int x; //x为用水量 scanf("%d",&x); double y; //y为水费 if(x<=15) y=4*1.0*x/3; else y=2.5*x-17.5; printf("%.2f",y);}

2020-02-05 20:03:42 2132

原创 浙大 - PTA - 基础编程题目集:7-10 计算工资 (15分)

#include <stdio.h>void sarvage(int worktime,int wage){ if(worktime<=40) printf("%.2f",worktime*1.0*wage); else printf("%.2f",40*wage+(worktime-40)*wage*1.5);}int main(){ int wo...

2020-02-05 20:03:02 727

原创 浙大 - PTA - 基础编程题目集:7-9 用天平找小球 (10分)

#include <stdio.h>int main(){ int A,B,C; char different; scanf("%d %d %d",&A,&B,&C); if(A==B) different='C'; else if(A==C) different='B'; else different='A'; print...

2020-02-05 20:01:34 280

原创 浙大 - PTA - 基础编程题目集:7-8 超速判断 (10分)

#include <stdio.h>int main(){ int quick; scanf("%d",&quick); if(quick<=60) printf("Speed: %d - OK",quick); else printf("Speed: %d - Speeding",quick);}

2020-02-05 20:00:27 271

原创 浙大 - PTA - 基础编程题目集:7-7 12-24小时制 (15分)

#include <stdio.h>int main(){ int hour; int minute; scanf("%d:%d",&hour,&minute); if(hour>12) { if(hour==24) { hour-=24; printf("%d:%d AM",hour,minute); } else...

2020-02-05 19:59:44 1079

原创 浙大 - PTA - 基础编程题目集:7-6 混合类型数据格式化输入 (5分)

#include <stdio.h>int main(){ float f1; int i; char c; float f2; scanf("%f %d %c %f",&f1,&i,&c,&f2); printf("%c %d %.2f %.2f",c,i,f1,f2);}

2020-02-05 15:38:42 362

原创 浙大 - PTA - 基础编程题目集:7-5 表格输出 (5分)

#include <stdio.h>int main(){ printf("------------------------------------\n"); printf("Province Area(km2) Pop.(10K)\n"); printf("------------------------------------\n"); printf(...

2020-02-05 15:34:23 415

原创 浙大 - PTA - 基础编程题目集:7-4 BCD解密 (10分)

#include <stdio.h>int main(){ int book[2]={0}; int number; scanf("%d",&number); book[0]=number/16; //book[0]存储十位 book[1]=number%16; //book[0]存储个位 if(number==0) //当number==0时,直...

2020-02-05 15:27:52 651

原创 浙大 - PTA - 基础编程题目集:7-2 然后是几点 (15分)

#include <stdio.h>int main(){ int time,add; // time;当前时间 add:流逝的时间(可以为负数) scanf("%d %d",&time,&add); int hour,minute; // hour:获取小时 minute:获取分钟 hour=time/100; // hour为最前面2位 m...

2020-02-05 14:55:07 962 1

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除