how to write the c++ programme of these questions (for loop)
Attachments:
Answers
Answered by
1
Explanation:
1.#include <iostream> using namespace std; int main() { for (int i = 1; i <= 5; ++i) { cout << i << " "; } return 0; }
2.// C++ Program to display a text 5 times #include <iostream> using namespace std; int main() { for (int i = 1; i <= 5; ++i) { cout << "Hello World! " <<
Similar questions