I'm really new to C++
So I learned how to make a basic for loop and I decided to try my best to make an infinite one. I thought that was a good way of learning. (Learning a small task then experimenting with it) But besides that.
Every time I run it, it doesn't say anything and just closes. Visual Studio doesn't say there's anything wrong with my code.
Here's the code
#include <iostream>
#include <conio.h>
using namespace std;
int main ()
{
int d = 9;
for(int k = 10; k < d; k = k +1)
{
cout << "For loop value = " << k << endl;
getch();
}
}

New Topic/Question
Reply


MultiQuote




|