I was given this forum address by a friend, and I am in need of some C++ help. I have just recently began learning about C++, and have been given a series of programs to do. I have completed the 4/5, and they work well. The following is the program I am having difficulties in getting to make...

"A rational number is usually written in the form P/Q where P and Q are integers. Write a program which reads a rational number in the form of the pair of integers corresponding to P and Q and outputs the equivalent real number."

I would greatfully appreciate some help in creating the program for this, and anything would be tremendously appreciated!

I like the looks of this forum, and the information in it! I will definitely be sticking around!


Post your latest attempt at coding it, tell us any errors you receive when trying to compile it, or if it does compile the output, and what you expected.

And above all USE CODE TAGS. (sorry to be so harsh, but it's a constant problem here)


I found out the other day what was up with my program, and all is good now :)

I'm liking this IT Forums, lots to read...

Keep it up!


Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.