Maybe you could try and deal with the file one line at a time? Then approach your two tasks (uppercasing and averaging) separately.
while not end of file
{
get 3 words and 3 numbers
...
Type: Posts; User: richfatsanta
Maybe you could try and deal with the file one line at a time? Then approach your two tasks (uppercasing and averaging) separately.
while not end of file
{
get 3 words and 3 numbers
...
Try looking up the functions rand() and srand(), as well as the use of the % mathematical operation.
It means the function is not included in the c headers that you are ummm including. Or you didn't define the function at the beginning of your code. Or you spelled it wrong. Lets just see the code.
From my experience there are two ways to do that. You can use globally declared variables or pointers.
Globally declared variables will be recognized by all functions so you don't have to worry...
JFonsenka,
The FIRST code you posted is almost right, you only have the order of a few elements around your while loop mixed up.
When you kept on getting the same answer no matter the input,...
Weird that exact code works perfect on my machine.
For input of a,b,c you are using values that actually make a real triangle and separated by spaces? Though even enter each time works on mine. ...
I don't know if you are trying the program just to practice your functions and such but either way...
float a,b,c,s,area;
scanf("%f %f %f",&a,&b,&c);
s=(a+b+c)/2;
Hey thanks for the quick help I just had to run off for a moment. Ummm I'm tired and will take a more in depth look at fget later. Ugh I wish i hadn't put this off to the last minute. I'll either...
Hi. My school assignment is to write a program to help someone learn their time tables. It works as expected however when trying to replace a system("pause") at the end of the program with a...