User Profile
Collapse
-
Got that, thank you for your help! Onto finding the range of these numbers.. *Remembers bubble sort from previous class and starts googling.* -
Alright, I got that much, but I have to keep the original formatting of the input file as well, including the lines. What would I use to do that so I don't get a bunch of jumbled together integers?Leave a comment:
-
so filein >> num when num is an integer variable would get those numbers one after the other?...Leave a comment:
-
Reading numbers from a text file problems
Hey guys, I have another problem in an assignment. I'm supposed to be reading a list of numbers seperated by one blank space spanned across three lines.
I'm having trouble figuring out how to skip blank spaces and just grab the number in each pass of the loop. A lot of this assignment's loops get averages of sets of these numbers. Originally I had it in:
Code:char fileinput; int sum int count
-
Okay, further debugging has found that it isn't floating point numbers causing the problem, but any numbers with a certain amount of significant digits.
Any ideas?Leave a comment:
-
We haven't covered that yet in this class. This is a 'basics of' class.
I don't want to post up my entire assignment, but it seems that if I use any floating point number, it just skips the entire if/else if structure and goes right to a catch all else at the end....Leave a comment:
-
Help with basic C problem
Hello,
I have an assignment due tomorrow that I've been trying to debug for a week. Google has failed me horribly at finding out what's going on.
The problem is to "use functional decomposition to write a C++ program that determines the median of three input numbers..."
So far the program that I've made will do this, but only with whole numbers. If I enter the floating point values that are supposed...
No activity results to display
Show More
Leave a comment: