这个程序俄绒错在哪里里??

这个程序哪错了?_百度知道
这个程序哪错了?
MyProjects&#92: void set(char [10]&#39.cppD.0\}}--------------------Ccout&#39.cpp(19) : &#39,na);endl&lt, right operand has type 'num&void student: error C2065;&lt.cpp(19) ;1;'MyProjects\Microsoft Visual Studio\MyProjects\Microsoft Visual Studio&#92.exe - 1 error(s): undeclared identifierD;VC++6;VC++6;name&lt.cpp(14) :.: &#39:&#92,char*na.exe 时出错: error C2065:set( ; &lt,char* void display().例题3点3.cpp(19) .0\1: undeclared identifierD;MyProjects\};VC++6: 例题3点3 - Win32 Debug--------------------C&lt:\例题3点3\VC++6;Microsoft Visual Studio&#92.1; : error C2065; sex=s;执行例题3点3\strcpy'&endl&lt,char s){ num=nclass student{private:display(){ cout&例题3点3&#92: &endl&#39.0\ char name[10]: error C2297;例题3点3\ :\&1;1;& strcpy(name.;&lt: &#39: &#39:: illegal: undeclared identifierD;Microsoft Visual Studio\sex&lt:\public,char s).0\
提问者采纳
class&st?{ student&zhang&//你连main函数都没有;name&}void&&nbsp.display();&& strcpy(namespace&set(int&&&&):;}int&string,&//不写这句就会提示cout&//没这个提示strcpy不能用; sex& void&&main()&&lt,包含头文件using&&lt: void&nbsp: int&endl&};s);display(),char*num&lt:display(){ cout&&f'n;student{name[10];endl&nbsp#include&iostream&endl&#include&n; char&&nbsp.h&&lt,char&& sex=s;不能用;s){ num=n,程序怎么执行; char&void&&nbsp,'public:set(int&nbsp,na),char*na,char&nbsp:;; st.set(1;&lt
提问者评价
其他类似问题
按默认排序
其他2条回答
#include &iostream&
strcpy(name,na);cout,endl函数没有在开始声明。
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁这个程序哪里错了?
这个程序哪里错了?
程序呢。?
#include&stdio.h&int main(){float x,y;printf(&请输入x值:%f\n&x);if(x&1){y=x;scanf(&y值为:%f&,&y);}else if(1&=x&=10){y=2x-1;scanf(&y值为:%f&,&y);}else if(x&=10){y=3x-11;scanf(&y值为:%f&,&y);}return 0;}
第一个printf:x前面少了逗号、else if:x&=10就好,或者写成x&=1 && x&=10
还是不对啊。。。
..........还有啥不对的、吧错误信息发出来看看。
Compiling...sdg.cC:\Windows\System32\sdg.c(13) : error C2059: syntax error : 'bad suffix on number'C:\Windows\System32\sdg.c(13) : error C2146: syntax error : missing ';' before identifier 'x'C:\Windows\System32\sdg.c(13) : warning C4552: '-' : op expected operator with side-effectC:\Windows\System32\sdg.c(18) : error C2059: syntax error : 'bad suffix on number'C:\Windows\System32\sdg.c(18) : error C2146: syntax error : missing ';' before identifier 'x'C:\Windows\System32\sdg.c(18) : warning C4552: '-' : op expected operator with side-effect执行 cl.exe 时出错.
哦,对了,忘了,要写成y = 2*x-1和y=3*x-1
没错误了。。。但是运行好像有问题。。。加q好不?
的感言:不知道说什么,送你一朵小红花吧:)
相关知识等待您来回答
编程领域专家各位C高人!看一下这个程序错在哪了?我运行不到正确结果!
各位C高人!看一下这个程序错在哪了?我运行不到正确结果!
#include &stdio.h&#include &math.h&void main(){&float x,y,z1,z2,z3,z4;&int h=10;&printf("此处坐标");&scanf("%f %f ",&x,&y);&z1=(x-2)*(x-2)+(y-2)*(y-2);&z2=(x-2)*(x-2)+(y+2)*(y+2);&z3=(x+2)*(x+2)+(y-2)*(y-2);&z4=(x+2)*(x+2)+(y+2)*(y+2);&if(z1&=1||z2&=1||z3&=1||z4&=1)&&h=0;&&& printf("此处高度%d\n",h);}
我感觉 if语句后面有点问题吧
具体的 也说不清楚...没学好...
为什么是&&不是||?
只能满足第一个条件 才=10
其他都是0??我这没安装C
你试下告诉我
我把H=10和H=0写反了。
不过你的也是正确的@你是从另一个角度理解的!
其他回答 (2)
程序的意图是什么?把题目说明白了。
坐标的(2,2)(-2,2)(-2,-2)(2,-2)为圆心,半径为1的范围内(包括1)高度H=10,其他的地方H=0;要求输入一个坐标,输出该坐标的高度H。
#include &stdio.h&#include &math.h&void main(){&float x,y,z1,z2,z3,z4;&int h=10;&printf("此处坐标");&scanf("%f%f",&x,&y);&z1=(x-2)*(x-2)+(y-2)*(y-2);&z2=(x-2)*(x-2)+(y+2)*(y+2);&z3=(x+2)*(x+2)+(y-2)*(y-2);&z4=(x+2)*(x+2)+(y+2)*(y+2);&if(z1&1&&z2&1&&z3&1&&z4&1)& h=0;& & printf("此处高度%d\n",h);}
述古啊,你的if语句好纠结啊。。。你是到底要执行哪条啊?是不是结果为0?
if(z1&=1||z2&=1||z3&=1||z4&=1)
printf(&此处高度h=%d\n&,h);
else 
printf(&此处高度h=0&);



什么呀?那不是一个逻辑运算么?
Z1或Z2或Z3或Z4中有一个大于0的就H=0
相关知识等待您来回答
编程领域专家请fortran大神看看这程序错哪了?初学子函数,不太会,求解_百度知道
请fortran大神看看这程序错哪了?初学子函数,不太会,求解
90)read (*)nallocate(a(n:,out,2) write(11,8)enddodo i=1,m)real kinteger
ik=(out-int)&#47,15)end dodo i=1,*) (a(i;mdo i=0;,status=&#39.txt&#39,,10)end do90 format(&#39,mXXH=int+i*kreturnenddoend function XXHprogram flownet2feapimplicit noneinteger n,na(,1)=a(i:).txt&#39,i;please input the number of ids,jreal c,XXH(c,breal,15),dimension(;)open(10:)open(11:&#39:;old&#39,nna(i,;fn,nc=na(i,allocatable,1)b=na(i,na(n;feapdata::a(,:),n
read(10:,2))do i=1,*)i,file=&#39,file='new',status=&#39real function XXH(int,j=1;)write(*,b,2)=a(i,7)na(i,j)
提问者采纳
10)end do90 format(&#39,out,m)implicit none ,file=&#39,dimension(;!&#47:),i;mdo i=0;)write(*,:' 这里要定义 XXH 的返回值是 real&#47,status='/ 子程序里也需要 Implicit nonereal k
,nc=na(i,7)na(i, int ,j),2))do i=1, out
::)open(11;new&#39:,XXH(c!&#47:),15)end dodo i=1,jreal c,na(;&#47,b; 并且申明所有变量,2) write(11。包括虚参;old&#39,也就是 in out minteger
i .txt&#39:a(;please input the number of ids, mk=(out-int)/fn,j=1,mXXH=int+i*kreturnenddoend function XXHprogram flownet2feapimplicit noneinteger n,status=&#39,2)=a(i,b ,8)enddodo i=1,90)read (*)nallocate(a(n,, XXH !&#47:,,na(n,allocatable,15),1)b=na(i:;;)open(10,file=&#39real function XXH(int,n
read(10,*)i,*) (a(i,nna(i,1)=a(i.txt&#39
提问者评价
其他类似问题
fortran的相关知识
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁这个程序错在哪里了?求高手解答_百度知道
这个程序错在哪里了?求高手解答
n&quot,j,%d*%d=%-3d& for (i=1;\*-3d表示左对齐;n&quot.h&quot.h&/    }   printf(& printf(&);i++)  { for(j=1;j&/j++)    {     result=i*j,result);     printf(&;#include&quot,j;&#92,占3位*/10;i&lt#include &),i;  }}这个程序错在哪里;10;*每一行后换行*/main(){ int i
我有更好的答案
没有什么错误啊?,提示什么错误
提示所有的都出错。。。
能告诉我是编译有误,还是你认为测试结果有误吗?如果是编译有误的话,能给出错误信息吗?
编译有错。。
请按标准写程序,养成良好的代码风格。int main()
{ }//c++int main(void) { } // c都是谭浩强那垃圾书,看见这main写的就蛋疼不已
你想干嘛?是不是工程建立错误了?这个程序本身没有问题啊。你可以把错误发出来让大家看看。
这就是错的。。
程序改好了。错误令人意想不到,你用的竟是中文的字母。#include &stdio.h&void main(){ int i,j, printf(&\n&); for(i=1;i&10;i++) {
for(j=1;j&10;j++)
result=i*j;
printf(&%d*%d=%-3d&,i,j,result);
printf(&\n&); }}
什么中文字母
其他类似问题
您可能关注的推广回答者:
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁

我要回帖

更多关于 芝诺悖论错在哪里 的文章

 

随机推荐