sorry for the fifth post in a row,. but i cant get this to work.
#include <stdio.h> #include <math.h> int main (void) { float diameter, area, radius, circumference, choice; { printf("CIRCLE CIRCUMFERENCE/AREA FINDER\n"); printf("------------------------------------\n \n"); printf("Area or Circumference??? 1=cricumference, 2= area\n \n \t - "); scanf("%f", &choice); } if (choice = 1); { printf("What is the diameter of the circle?\n \n \t - "); scanf("%f", &diameter); circumference = diameter * 3.14; printf("\n \t- %f", circumference); } else; { printf("What is the radius of the circle???\n \n \t - "); scanf("%f", &radius); area = (radius * radius) * 3.14; printf("\n \n \t \t = %f", area); } scanf("%c"); return 0; }
it is an extension to my circumference finder, but i cant get it work rite. this one will be able to find the area of a circle as well, and ive alredy tested the area part to see if it works, and it does. its a problem with the if statement. please fix it somebody. ill be waiting.
thanks for all the help you guys have been. withought you guys, none of my programs would work. thanks again!
matt wuz here
|