I'm writing a program for calculating the circumference of a circle being entered by the user....only problem is...hypergrade won't accept it. I'll pot a screenshot.
on line 9, you calc circumference before you have the radius! You should get into the habit of initialising your variables to something at declaration, zero is not always the best option.
Also, scanf returns an int which is the number of valid input read. You should make use of this in order to see if it worked. There are a variety ways of doing this depending on how many values are being read. You could use a whilefor 1 value, a switchfor several values.
HTH
Edit:
You can still use doublewith the %f in scanf & printf
Edit 2:
Rather than use #define , have a const double in main()
you are my knight in shining armor. Thank you so much! This is my second week ever programming so I'm bound to mess up on obvious things. Thank you for being patient!
Edit: ill try to get into the habit of using double and initializing my variables.