-
来看看, 我不会这个问题!!
以下是引用zhao9302在2007-7-123:33:27的发言: 这不和求和一样嘛定义后输入公式就好了intf,c;printf(……);scanf("……c=(f-32)/1.8;输出C 这样行吗?就算行也是有毛病的 color='#FF8000'>----------------解决方案--------------------------------------...
140
热度 -
提问一条题目
提问一条题目 main(){intx=102,y=012;printf("%2d,%2d\n",x,y);getch();}执行后输出结果为什么是102,10 搜索更多相关的解决方案: color="red">提问 color='#FF8000'>----------------解决方案---------...
130
热度 -
有个问题问一下
有个问题问一下 这个源程序在vc6.0编译很正常,但为什么到了TC上就出现很多错误呢?哪位大侠提供帮助,多谢了! #include<stdio.h> #include<stdlib.h> boolexit_process(); voidprint_menu(intc); boolisLeapYear(intyear); voidLeapYear(...
307
热度 -
hdu1094解决方法
hdu1094http://acm.hdu.edu.cn/showproblem.php?pid=1094一道很简答的题,为什么我的代码就是一直超时呢,我看和别人的一样哇#include<stdio.h>#include<stdlib.h>intmain(){intn,sum,i,a;while(scanf("%d",&n)!=0){sum=0;for(i=0;i&...
9075
热度 -
怎么读取gprs的返回值
如何读取gprs的返回值?当给gprs输入at后,会自动返回一个OK或ERROR,我用scanf读取时候每次不正确!请问各位大侠,我改如何读取这个返回值?帮帮忙吧~color='#e78608'>------解决方案--------------------------------------------------------不正确?首先确认你串口的问题.另外就是读取方式是否正确.
9529
热度 -
程序虽小,但可看出基础是否扎实!!
程序虽小,但可看出基础是否扎实!! #include<stdio.h> main() {charch; printf("inputch:"); scanf("&d",&ch); } 这是我犯的一个小失误,希望大家不要犯哦!!!!! 搜索更多相关的解决方案: color="red">基础 ...
100
热度 -
[求助]switch的一个问题
[求助]switch的一个问题 #include<stdio.h> intmain(){inta;floatC,F;printf("WantCtoF,pleaseinput1!\n");printf("WantFtoC,pleaseinput2!\n");scanf("%d",&a); switch(a){case1:{printf("Plessei...
291
热度 -
[求助]在线.
[求助]在线. #include<math.h>typedefstructcity{charname[10];floatx;floaty;structcity*next;}city;city*p1,*p2;voidsearch(city*P1){charname_search[10];printf("pleaseinputcity'sname\n");sca...
399
热度 -
[求助]有个循环问题
[求助]有个循环问题 while(scanf("%d",&num)!=EOF)有人说我这写成了个死循环,请帮忙找一下错误。谢谢! color='#FF8000'>----------------解决方案-------------------------------------------------------- ...
89
热度 -
请问这个怎么运行错误了?
请问这个怎么运行错误了? #include<stdio.h>#definelistsize10typedefintdatatype;typedefstruct{datatypedata[listsize];intlength;}seqlist;intmain(){seqlists;s.length=0;inti;for(i=0;i<listsize;i...
175
热度 -
要急出人命了。不执行问题
要急出人命了。不执行问题 高人来看下********和////////////那部分的代码怎么不执行。这段程序是为了试验写的.本来想写个学生信息管理系统的,但写到这地方就写不下去了,所以摘出来做下试验。编译器DEV-C++#include"stdio.h"#include"conio.h"main(){charc,_c;while(1){scanf("%c",&...
111
热度 -
看看我的数组数据。谢谢!
看看我的数组数据。谢谢! 下面是我写的程序,为什么我输出的数组数据全都是0,没有保存到吗?求助!!!#include"stdio.h"main(){intn,w,m,i,k;intscore[40][3];printf("welcome!!,printfinputthedatanecessary.\n");printf("inputthenumberofschools\...
160
热度 -
关于判断一个年份是否为闰年的题目。
以下是引用Knocker在2007-9-29:41:39的发言: #include<stdio.h>main(o){main(printf(&"不是闰年\n"[((!(o%4)&&o%100)||!(o%400))<<1],printf("%d年",o),scanf("%d",&o,printf("请输入年份:\n"))));} 什么意思啊....
393
热度 -
这题写起来很容易,但公式很。。。。
#include<stdio.h>voidmain(){inti,j,a[4];printf("Enteranumber:");for(i=0;i<4;i++)scanf("%d",a[i]);for(i=0;i<4;i++)j+=a[i];printf("%d\n",j);gerchar();}各位前辈偶也不知道对不对,在网吧了没有编译,请教各位了!! ...
88
热度 -
数组问题
数组问题 inti,a[10],max; for(i=0;i<10;i++) scanf("%d",a[i]); max=a[0]; for(i=0;i<10;i++) if(a[i]>max)max=a[i]; printf("%d,%d",max,i); }那里错了??? 搜索更多相关的解决...
305
热度 -
运行后,结果怎么是这样的
主函数中没有对max的声明还有注意你的scanf是怎么写的输入的时候注意scanf("%d%d",&a,&b);可以用回车或者N个空格或者tab但是千万不要用,其他好像没有什么问题 color='#FF8000'>----------------解决方案---------------------------------------------------...
184
热度 -
这个程序有个函数的问题
这个程序有个函数的问题 #include"stdio.h"structxinxi{charname[20];charyuanxi[20];longnum;intxiangmu;intmingci;};structxinxia[50];structxinxip;voidshuru(){inti;charc;for(i=0;i<50;i++){printf("qing...
353
热度 -
如何拷贝字符串的前几个字符阿??
//strncpy函数#include<stdio.h>#include<stdlib.h>char*StrCNopy(char*s,char*t,intn);intmain(){char*str1,*str2;intnn;str1=(char*)malloc(100*sizeof(char));str2=(char*)malloc(100*sizeof(char));pr...
110
热度 -
刚学C,帮我看看这程序哪错了呀?
汗 color='#FF8000'>----------------解决方案-------------------------------------------------------- 程序没有问题,如果是 scanf("%d,%d,%d",&a,&b,&c); 输入数字时要用逗号...
162
热度 -
[求助]怎样实现循环?
LZ``我觉得你的程序回有一个小BUG``当我们输入0``0是整数```但是!0``就是真``那么结果就不你想要的了```所以应该加个判断while(!status&&status+48!='0') 还我``发现你犯了个很低级的错误````while(!status);你在while后面加了分号```如果第一次输入的就是非整数``那么就算你清空了键盘缓冲```也是死循环`` col...
39
热度