18326638710 发表于 2013-12-6 11:55:58

连续四个输入,第三个输入不能输入

00401028 push offset string "\xc7\xeb\xca\xe4\xc8\xeba\n" (0042504c)
0040102D call printf (00401140)
00401032 add esp,4
8: scanf("%d",&a);
00401035 lea eax,
00401038 push eax
00401039 push offset string "%d" (00425048)
0040103E call scanf (004010e0)
00401043 add esp,8
9: printf("请输入b\n");
00401046 push offset string "\xc7\xeb\xca\xe4\xc8\xebb\n" (0042503c)
0040104B call printf (00401140)
00401050 add esp,4
10: scanf("%d",&b);
00401053 lea ecx,
00401056 push ecx
00401057 push offset string "%d" (00425048)
0040105C call scanf (004010e0)
00401061 add esp,8
11: printf("请输入x\n");
00401064 push offset string "\xc7\xeb\xca\xe4\xc8\xebx\n" (00425030)
00401069 call printf (00401140)
0040106E add esp,4
12: scanf("%f",&x);
00401071 lea edx,
00401074 push edx
00401075 push offset string "%f" (0042502c)
0040107A call scanf (004010e0)
0040107F add esp,8
13: printf("请输入y\n");
00401082 push offset string "\xc7\xeb\xca\xe4\xc8\xeby\n" (00425020)
00401087 call printf (00401140)
0040108C add esp,4
14: scanf("%e",&y);
0040108F lea eax,
00401092 push eax
00401093 push offset string "%e" (0042501c)
00401098 call scanf (004010e0)
0040109D add esp,8
15: }

这是汇编调试代码, 不知道是什么错。。

~逆天~ 发表于 2013-12-6 11:59:21

我才学到CALL

my_angel 发表于 2013-12-6 12:10:45

放出源码。。

18326638710 发表于 2013-12-6 12:47:40

my_angel 发表于 2013-12-6 12:10 static/image/common/back.gif
放出源码。。

#include <stdio.h>

void main()
{
int a, b;
float x, y;
printf("input a: \n");
scanf("%d", &a);

printf("input b: \n");
scanf("%d", &b);

printf("input x: \n");
scanf("%f", &x);

printf("input y: \n");
scanf("%f", &y);
}

18326638710 发表于 2013-12-6 12:51:38

~逆天~ 发表于 2013-12-6 11:59 static/image/common/back.gif
我才学到CALL

你学的比我学的多,我才学到loop循环。。

qq348093088 发表于 2013-12-6 13:32:12

浮点要初始化
float x=0, y=0;

wangdemin 发表于 2013-12-6 22:38:19

怎么加入终身vip

思颖 发表于 2013-12-7 08:35:48

我运行的时候没错阿

牡丹花下死做鬼 发表于 2013-12-7 08:52:08

scanf("%e",&y)这句话改成scanf("%lf",&y) 不能以科学计数法直接接收只能把double以科学计数法输出

zjhwasd 发表于 2013-12-7 18:53:26

我才学到loop啊 现在开始第六章了
页: [1]
查看完整版本: 连续四个输入,第三个输入不能输入