Untitled

mail@pastecode.io avatar
unknown
c_cpp
5 months ago
393 B
1
Indexable
#include <iostream>

int main()
{
    for (int i = 1; i <= 5; ++i)
    {
        std::cout << i << ", ";
    }

    std::cout << "\n\n";

    int i = 1;
    while (i <= 5)
    {
        std::cout << i << ", ";
        ++i;
    }

    std::cout << "\n\n";

    i = 1;
    do
    {
        std::cout << i << ", ";
        ++i;
    } while ( i <= 5 );

    return 0;
}
Leave a Comment