View Single Post
  #1 (permalink)  
Old August 18th, 2012, 02:03 AM
pgmr_prantik pgmr_prantik is offline
Registered User
 
Join Date: Aug 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy plz help me where my code is wrong?

//define constants: calculate circumference

#include<iostream>
#include<conio>
using namespace std;

#define PI 3.14159
#define NEWLINE '\n'

int main()
{
double r = 5.0; //radius
double circle;

circle = 2*PI*r;
cout << circle;
cout << NEWLINE;

return 0;
getch ();

}



I''m new to programming, In the above code line 20 D:\Dev-Cpp\bin\Tests\circle_circumference1.cpp `getch' undeclared (first use this function)
I do not understand .....what is the error? Plz help me
Reply With Quote