Hello Everyone. I have to write a For Loop that prints multiples of 5 from 1 to 400. So far this is what I have, but I can't figure out how to jump from 1 to 5 and go 5, 10, 15, 20, and so on to 400. I know I have it to where it goes 1, 6, 11, 16, and so on because I'm adding 5 to it, but how do you jump from 1 to 5 and go from there?
#include <iostream>
using namespace std;
int main()
{
int num;
for(num = 1; num <= 400; num += 5)
{
cout << num;
cout << '\n';
#include <iostream>
int main()
{
int num = 1 ; // start with 1
std::cout << num << '\n' ;
// and then, starting with 5, and incremet of 5
for( num = 5 ; num <= 400 ; num += 5 ) std::cout << num << '\n' ;
}