What's new

Closed Pa see ng output tracing technique niyo with these codes

Status
Not open for further replies.

Denski101

Honorary Poster
Joined
Jun 22, 2019
Posts
244
Reaction
56
Points
134
for(int i=1; i<=6; i++){

cout<<"Value of variable i is: "<<i<<endl;
}
 
lalagay ba yung output?

eto:
Value of variable i is: 1
Value of variable i is: 2
Value of variable i is: 3
Value of variable i is: 4
Value of variable i is: 5
Value of variable i is: 6
 
for(int i=1; i<=6; i++){

cout<<"Value of variable i is: "<<i<<endl;
}


i = 1,
1 <= 6 ? if true, then display value of i, then i++

so, i = 2
if 2 <= 6 ? if true, then display value of i , then i++

.....

i = 7 ? since false, out na sa loop..
 
Status
Not open for further replies.

Similar threads

Back
Top