C++ for Statement Question

Introduction

Write a program that uses a for-loop to print out the counter 15 times.

The counter starts at 0.

You can use the following code structure.

#include <iostream> 

int main() 
{ 
    //your code here
} 


#include <iostream> 

int main() 
{ 
    for (int i = 0; i < 15; i++) 
    { 
        std::cout << "The counter is now: " << i << '\n'; 
    } 
} 



PreviousNext

Related