would you say these loops are correct? if not could anyone tell me why or give me any hints
the question is.... Write two loops to display the characters of the string s in reverse order. One...
Type: Posts; User: cakestler
would you say these loops are correct? if not could anyone tell me why or give me any hints
the question is.... Write two loops to display the characters of the string s in reverse order. One...
ok so i fixed the problem with it not being random, now i still have the other problem which is that it prompts the user twice for r p s or quit after inputing r p s the first time(see above post at...
thank you! i guess it isn't random, when i put the fflush(stdin) it becomes random and fixes my other problem. but i have read that it is not a good idea to use this. is there anything else that i...
i had that originally but that actually causes another problem. thank you for trying though.
here is what comes up in my program
please enter r p s or q: (i enter r for example)
(then for ex...
hello, i am writing a code to simulate the game rock paper scissors, i have it working, but i have a small problem. the game asks for R P S or Q(quit), then it tells you the outcome of the game, then...
yay! thankyou!
revised loop again sorry
printf("Enter the temperature followed by F or C( Ex: \"75 F\"):");
scanf("%lf%c", &temp, &scale);
if ((scale == 'C' || 'c') && (temp > absZeroC)) ...
sorry the indentation is a little messy
thanks!! that helps, but now it just prints both values, here is my revised code
double fTOc(double); //Fahrenheit to Celsius
double cTOf(double); //Celsius to Fahrenheit
int main()
{
...
we have never used the strcmp concept yet, is there another way to compare strings?
hello, i am working on a tempconverter program, i have tried a number of things to get this program to work and everytime i try something it seems to either mess something else up, or only do half of...
thank you!
hello, i am working on this program that calculates the resistance of an arbitrary number of floating points, the input needs to end when i press zero or EOF...i have the zero part but for some...
THANKS!!!! is there any way that i can get it to give me the result by pressing EOF( ctrl Z)???
hello i am new to c programming. i need to enter an arbitrary number of floating points and plug these numbers inthe the formula
1/Rn = 1/R1 + 1/R2 + ....+ 1/Rt
i need to do this in ohms so the...
thank you for being understanding, i am new at this and have been working on this code now for about 6 hours yesterday and about 5 now today...i was reaching my breaking point. thank you for your...
i got it....looks like things were messed up with my file NOT my code....it was fine using feof!!!
i changed it but it still doesn't work can someone PLEASSEE!!! help me!!! i dont understnad what i am doing wrong
#include <stdio.h>
#include <stdlib.h>
int main()
{
sure when i use that form it does fix the problem of counting everything correctly, but it messes up everything else
i was using that code before, i already changed the format of my program, that won't work. i have added fclose to my program but that didn't change anything. come on im not asking anyone to write my...
do i need a
fclose(tempsIn);
???
if so that isn't working.
ok so i have changed a few things and have my program running and working almost perfectly. i am haveing 2 problems. there are 30 temperatures in my file, yet my program says there are 31, also my...
no i am not a stranger to division i am a math major, i am a stranger to c programming, i suck i know, but i've reread my book and notes about 10 times now and im still not getting it
is it valid to say
while(fscanf(tempsIn, "%2.0lf", &nextVal) != EOF)
tempcount++;
(total += nextVal) / total;
so i've worked on things a little more but i still can't get it to print average
here is my code
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
int main()