php hit counter

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
something is wrong with this version of dev c++
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support
#2
Dear Student,
It may not necessarily be a problem with your Dev C++ IDE. The difference in the version of Dev does not make much of an affect. I think that the issue is with the code which you are compiling may contains soem syntax errors. Another important thing you should keep in mind is to add the line using namespace std; at the top of your each program and also write the following line system("pause"); before the closing curly brace '}' of the program.

Below is the correct code of the above mentioned program. Just compile and run it to see if it works.

#include <iostream.h>

using namespace std; // this line was missing in your code

main()
{
int sum, number;


sum = 0;
number = 1;

while(number <= 1000)
{
sum = sum + number;
number = number + 1;
}
cout << "The sum of first 1000 integers starting from 1 is " << sum;

system("pause");// this line should also be written to halt the output screen so that you can see the program output
}
Reply


Messages In This Thread
something is wrong with this version of dev c++ - by sana.pari - 04-24-2011, 06:31 PM
something is wrong with this version of dev c++ - by Support - 04-24-2011, 06:31 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Version Problem sana.pari 1 1,623 04-24-2011, 07:21 PM
Last Post: Support

Forum Jump:


Users browsing this thread: 1 Guest(s)
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support