// CM11 42Loops.cpp created by // This program was supposed to use functions and increment a number input by user. #include "stdafx.h" #include using namespace std; int inputInteger = 0; char name[40]; void forLoop(int _inputInteger); void whileLoop(int _inputInteger); void doWhileLoop(int _inputInteger); int main() { int inputInteger = 0; cout << "Welcome to this program. What is your name?" << endl; cin >> name; cout << "Choose a number please, " << name << "." <> inputInteger; forLoop(3); return 0; } void forLoop(int inputInteger) { for (int inputInteger = 0; inputInteger < 20; inputInteger++); { cout << inputInteger++; } } void whileLoop(int inputInteger) { while (inputInteger = 0 || inputInteger < 20) { cout<< inputInteger; } } void doWhileLoop(int inputInteger) { do { cout<< inputInteger++; } while (inputInteger = 0 || inputInteger < 20); }