hey guys when i try to run this program, i get the correct output in c free compiler..but when i try to run it onlinein ideone, i get a run time error..please help me guys...
the problem was with using iostream.h where just iostream was needed also i had to use the statement using namespace std...
but now its giving a run time error...some non-standard memory allocation or something like that...the headaches of c++!! i would have implemented the same thing in java..but im still doing simple exercises by taking inputs through command line...im yet to learn how i can take inputs during run time....
by the way the name of the compiler is ideone.com..avoid unless you are using java
learning java paid off...i dont know if this code below is badly structured or has bad coding practices, but with the little knowledge i had,i was able to achieve the same thing in java..and the online compiler gave up and compiled..