Department of Engineering
University of Cambridge
>
Engineering Department
>
computing help
>
Languages
>
C++
C++ "for" loop teaching aid
Look at the following code.Type in something between the brackets so that the compiled code would print
Hello
5 times
#include <iostream> using namespace std; int main() { for (
) cout << "Hello "; };
P.S
. the checker isn't foolproof. The best way to check your answer is to put the program into a file, compile it, then run it!
|
C++
|
Languages
|
computing help
|
©
Cambridge University Engineering Dept
Information provided by
Tim Love (tpl)
Last updated: January 2008