Hi
I'm a complete new to this programming world and know nothing about. My aim is to learn to C++ basic console based programming. I hope you all would kindly help me to do this.
I copied this program from somewhere:
Code:
#include <iostream.h>
#include <stdio.h>
#include <conio.h>
void main ()
{
clrscr;
int x;
cout<<"Enter the number to be Cubed";
cin>>x;
cout<<x*x*x<<endl;
getch();
}
I hope there were no errors in the above source code (I think that's what you call it). Please let me tell you again that I am blank illiterate in computer programming and am self learner.
What do these statements mean at the start: #include <iostream.h>, #include <stdio.h>, and #include <conio.h>?
I believe in C++ every statement is separated by ";"?
What's the purpose of writing "getch()" at the end?
I understand it takes a lot of energy and time to help someone like me. But I would be very much indebted to you for your help and teaching me to write some basic programs. With the hope that it's going to be pleasant and informative learning experience, I await your help.
Best wishes
Jack
PS: I've wrapped the code as suggested by quzah