
C语言基础题库之编程题
幕宾静水
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
字符串->整数
Title 输入一个表示整数的字符串,把该字符串转换成整数并输出。例如输入字符串"345",则输出整数345。 Answer The following code block is a kind of answer: #include<stdio.h> #include<stdlib.h> int char2int(char *str,char* t); int main(...原创 2020-01-28 22:29:20 · 465 阅读 · 0 评论 -
PTA-输出倒三角图案
/*#include<stdio.h> int main(){ int i,j,count=4; for(i=count;i>0;i--){ for(j=count-i;j>0;j--){ printf(" "); } for(j=count-i;j<count;j++){ printf("* "); } printf("\n\n"); } ...原创 2018-04-28 17:23:04 · 814 阅读 · 0 评论 -
PTA-输出华氏-摄氏温度转换表
#include<stdio.h> #include<math.h> float Celsius(int F); int main() { int lower,upper; scanf("%d %d",&lower,&upper); if(lower>upper||Celsius(lower)==Celsius(upper)==-1)//...原创 2018-10-11 23:02:08 · 4733 阅读 · 0 评论 -
PTA 猜数字游戏
#include<stdio.h> int main() { int random,N,count; scanf("%d %d ",&random,&N); int i; count=0; do { scanf("%d",&i); if(i>=0) { count++; if(i==...原创 2019-03-27 21:38:29 · 1491 阅读 · 0 评论