Ah I was SO close. :) I had it:
but now I see why that does not work.
Thanks all!!
Type: Posts; User: rightbrainer
Ah I was SO close. :) I had it:
but now I see why that does not work.
Thanks all!!
Ok that made me think. Thank you :) Ok so I re-thought my solution and I changed it to:
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
float inches,...
Ah! Ok got it. Next step. Why isn't the math working now?
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
float inches, centimeters=2.54;
printf("Enter inches:...
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
int inches, centimeters=2;
printf("Enter inches: ");
scanf("%d, &inches");
printf("%d inches equals %d centimeters",...
"Well then programming isn't the thing for you.."
Ironic; I'd say given your lack of patience, TEACHING isn't for YOU.
In any case, I got it...
#include <stdio.h>
#include <cs50.h>
Sorry I don't follow either reply.
Hello all!
I have a problem I need help with. I am tasked with creating a half pyramid like below. First I prompt user to enter an integer less than 23 to dictate how many asterisks in height the...
Thanks but way beyond me at this early stage
Elysia, thanks for the feedback. I realize the indentation is bad. I will clean it up. Thanks for your help and insight
Ahhh you are good Elysia :) I added loops now and it works!! I have updated the code in prev post
For the record there was nothing wrong with the getFloat function. Here is the completed, working bmi program. I am certain there are easier ways to do this rather than spell everything out...
Hello cprogramming.com world! :P
How do I write this math problem in my code?
X divided by Y to the second power multiplied by 703?
I tried:
total=(x / y^2) * 703);
quzah, thanks. I did that and it shows all zeroes for values
Getting closer aren't I? Problem now is that all values are coming back "0" so the calculation is not working.
help
#include <stdio.h>
#include <cs50.h>
Ok now I get that part... so I need to change all INT references to FLOAT (there is also a getFloat function in the cs50.h header). Is this right? What else is now wrong?
#include <stdio.h>...
I posted this to Craig's List and will post it here as well:
Hello, I am taking a C Programming course online. I am doing OK, but I need an experienced guru to help me along, review my...
hk.. thanks! It compiles and runs! Problem is now that no matter what values I enter it says "you are under weight"
I suspect this is because I am not handling decimal points..?? Problem is, I...
When I try to compile this, I get an error. The error is "In function main, called object on line 27 is not a function" . Line 27 is: totalHeight = (feet * inchesPerFoot) + inches;)
Next error...
Elysia, I already told you getInt is in the cs50 header I am including. Here it is for the record:
int
GetInt()
{
// try to get an int from user
while (true)
{
// get...
Ok granted it's still hosed, but with more research I think I improved it a lot.... or maybe not? I still need to figure out how to get the loop in here in case they enter a negative number.. and...
Hi all, and thanks for responding. Please understand, I am a complete beginner. The course is a complete beginner's course. I have zero programming experience. The instructor covered loops, floats,...
Thanks for your patience with me. I know these messages are probably annoying. Thanks for bearing with me.
So my new assignment is as follows:
I have read the lecture material repeatedly as...
Adak, thank you so much! It works. :)
Ok so let me see if I have this right (don't laugh!)
#include <stdio.h>
#include <cs50.h>
int
main(int argc, char * argv[])
Hello all
I have always wanted to learn to program. I have started and quit many times. it is tough as a self-taught student. I found a good online course recently. I intend to see it through. ...