A83: OT:C++ program


[Prev][Next][Index][Thread]

A83: OT:C++ program




What's wrong with this code, every time I run the prgm it displays 1
constantly. When it should display each of the values (1-10) held by the var
cnt. Can someone please help me out, so I don't have to constantly restart my
computer everytime it loops 1 and freezes up.
Michael

#include<iostream.h>
#include<stdio.h>
#include<ctype.h>
#include<conio.h>
void main()
	{
	clrscr();
	for(int cnt=1;cnt<=10;cnt=cnt++)
	cout<<cnt<<endl;
	}


Follow-Ups: