About for loop statement

未标题-1.jpg
After compiled and ran for this code.When i input 1 on control,then control output 2.At first i do not understand that why control output 2.
No long after,i understand because that the program must carry the i++ statement.So control output 2.
The code as follows:
#include"stdio.h"
#include"stdlib.h"
main(){

int i;
for(i=3;i<=6;i++){
    printf("%d\n",i);
    scanf("%d",&i);
}
system("pause");

}
捕获.PNG

H2
H3
H4
3 columns
2 columns
1 column
Join the conversation now
Logo
Center