L
lps
Unregistered / Unconfirmed
GUEST, unregistred user!
for &
getchar
下面的程序在VC6.0中为何第二个循环到28的2显示后就暂停了?
百思不解!
#include <iostream.h>
#include <stdio.h>
int main()
{
for( int i = 0;
i <=100;
++ i )
cout << i << "/n";
// The loop index, i, cannot be declared in the
// for-init-statement here because it is still in scope.
for(i = 100;
i >= 0;
--i )
cout << i << "/n";
getchar();
return 0;
}
getchar
下面的程序在VC6.0中为何第二个循环到28的2显示后就暂停了?
百思不解!
#include <iostream.h>
#include <stdio.h>
int main()
{
for( int i = 0;
i <=100;
++ i )
cout << i << "/n";
// The loop index, i, cannot be declared in the
// for-init-statement here because it is still in scope.
for(i = 100;
i >= 0;
--i )
cout << i << "/n";
getchar();
return 0;
}