#include <stdio.h>
int main()
{
printf("\n");
printf("QUESTION\n");
printf("\n");
printf("Calculate the circumfrence of a circle knowing the diameter?\n");
printf("\n");
printf("Formula Pid\n");
printf("\n");
printf("Declerations\n");
printf("\n");
printf("Pi = 3.14\n");
printf("\n");
printf("d = 20\n");
printf("\n");
int pi=3.14;
int d=20;
int answer=pi*d;
printf("the answer is %i\n",answer);
printf("\n");
// make the program wait for a new line to be entered
puts( "press ENTER to quit" ) ;
int c = 0 ;
while( c != '\n' && c != EOF ) c = getchar() ;
return(0);
}
Thanks very much for all the help working fine now. Can someone point me in the direction as to how the code asks questions you input the information and then it does the calculation.