Thanks so much everyone!! The following code worked perfectly! I was trying to use the static char as mentioned earlier today because I was thinking that was an issue as well but it still would not...
Type: Posts; User: BeldenML
Thanks so much everyone!! The following code worked perfectly! I was trying to use the static char as mentioned earlier today because I was thinking that was an issue as well but it still would not...
right but thats what im asking help on. I know that thats not the correct printf statement. Also I know that the other printf statement in the function is not supposed to be there but thats what I...
I tried putting in that printf state but my output is still (null)
#include <stdio.h>
#include <stdlib.h>
char *int_to_binary(int);
char b[80];
int main(void)
{ ...
Hello all,
This is my project..
"Write a function to return the binary representation of the number x as a character string. For example : if x = 17 is passed to the function the return value...
ok well Im finished and everything works! Thanks for the help everyone..heres the code! Does spacing and everything look ok?
#include <stdio.h>
/*
int isperfect(int x)
{
int...
Hey Salem, wow I have no idea what I was thinking. I think I was in kind of a daze last night from the long day. I swear calc 3, diff eq, physics, logic design, and this class are just burning me...
That will yield this...
6+
6+
28+
28+
28+
28+
496+
496+
Ok so paste it in my main () after It finds "if isperfect(a)"? and then add a printf statement to print the total? Im not quite understanding. I know you say just cut and paste but its not so...
Thanks anduril for the tip. Can you explain further the "dumb" way you suggested? We dont learn about arrays until next week so I dont want to write the code using an array. How would I reuse the...
Hi salem thanks so much for the response! However, we have not covered arrays yet so I cannot use them. Even though from your comments and also grumpys it looks like that would be the proper way to...
Ok well this is what I did and it yields the correct output I need but I know there is a better way. All I need is put what I want in the print f statement. So again if someone could help me find a...
Im not sure how to store the factors?...
ok grumpy nowhere in my question did I ask for anyone to write code for me. Just was stuck and wanting some advice, which I appreciate. I have not learned arrays yet so that suggestion is out the...
Yes it does Salem but it only prints the number.
Hey everyone hope all is well! Its that time of the week again and Im stuck already! lol I think I have gotten far this time, but still cant get things right.
The project calls for a program...
Yes! I think I finally have it working. I changed my low if statement that it must be greater than zero. This is my final draft so let me know what you guys think!
int main(void)
{
...
ok here i changed low = 100 but Im having the same problem where it is reading my exit negative number as the lowest number. Heres what I have now
int main(void)
{
float i;
int...
Oh i figured out why my avg was off. I needed to place my sum statement after the break statement. Now I have avg, high, and sum working. I just need to figure out low.
but now my average isnt working and the lowest number its printing is the -1. I think I need to move some things around but not sure where...
This is what I have so far but its not working
int main(void)
{
float i;
int num,sum, high, low, var;
oh ok I see! Im not sure how to write that code though. should I set high=0 and low=0 and then add another if statement saying
if (num >= high)
{
num=high
}
I thought I was saving the scores read as "int num"? laserlight Im kind of confused now..
Tater what does the "Return 0" you added on line 21 do again?
ok Im back on it! laserlight let me TRY to add it into the loop and let me know if im on the right track..THANKS!
Hey guys the network at school I was logge dinto and saving my code on is down. Im not sure why but either way its 1am and I need to get at least a few hrs of sleep. I will be right back at it in...