Given an int variable i that has already been declared , write a for loop that prints the integers 0 through 39, separated by spaces. Use no variables other than i .

1
Given an int variable i that has already been declared , write a for loop that prints the integers 0 through 39, separated by spaces. Use no variables other than i .

LANGUAGE: C++

CHALLENGE:

Given an int variable i that has already been declared , write a for loop that prints the integers 0 through 39, separated by spaces. Use no variables other than i.

SOLUTION:


for (i=0; i<=39; i++){
    cout << i << '\n';
}

One comment

Add comment