Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!uwm.edu!bionet!agate!darkstar!ucscf.UCSC.EDU!joshin From: joshin@ucscf.UCSC.EDU (98896000) Newsgroups: comp.sys.amiga.programmer Subject: I need help with PDC (and C in general) Keywords: PDC Message-ID: <14361@darkstar.ucsc.edu> Date: 12 Apr 91 00:32:08 GMT Sender: usenet@darkstar.ucsc.edu Followup-To: mail Distribution: usa Organization: University of California, Santa Cruz Lines: 27 I just completed my first C program for my C class and I wanted to run it at home so I got DICE C. Well my program was to find the Volume of a cylinder and since floating point isn't supported I couldn't do it on DICE. So I got PDC and now it seems that scanf doesn't work. Here is my program, please tell me if I'm doing something wrong: #include #define PI 3.1419 float Radius, Height, Volume; /* declares variables used */ main() { printf("\n This is a program that will compute the volume of a cylinder. "); printf("\n Please enter the radius: "); /* prompt for radius */ scanf("%f", &Radius); printf(" Now please enter the height: "); /* prompt for Height */ scanf("%f", &Height); Volume = Radius * Height * PI; printf("\n The volume is %f . \n", Volume); } All the program does is print out the print commands. Help please.