#include "stdafx.h"
#include <iostream>
usingnamespace std;
int main(void)
{
int i = 0;
for (i = 0; i < 10; i+=3);
std::cout << "How often: " << i <<"\n";
i = 0;
while (i < 10)
{
cout<< i << endl;
i += 4;
}
}
@warkari: you forgot the "{}" of the forloop and remove the ";" at the end of it
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#include <iostream>
int main()
{
for (int i = 0; i < 10; i+=3)
{
std::cout << "How often: " << i << std::endl;
}
int i = 0;
while (i < 10)
{
std::cout << i << std::endl;
i += 4;
}
}