Так что я выполняю задание для школы, но я продолжаю получать сообщения об ошибках, и я прочитал несколько потоков, и я не нашел ни одной души, или, может быть, я просто не понимая, что говорится.ошибка несовместимых типов при назначении типа из типа в C
Вот мой код:
#include <stdio.h>
int main() {
//declare the variables
float radius, circumference;
radius = 0;
printf ("This program will calculate the circumference of a circle given the radius\n");
printf ("Please enter the radius of the circle:\n");
scanf ("%f", &radius);
circumference = calculate_circumference(radius);
printf ("The circumference of the circle is:\n", circumference);
return 0;
}
float calculate_circumferene (float circle_radius)
{
float circle_circumference, PI;
PI = 3.14159;
circle_circumference = 2 * PI * circle_radius;
return (circle_circumference);
}
Вот сообщения об ошибках, я получаю:
prog.c: In function 'main':
prog.c:21:18: warning: implicit declaration of function 'calculate_circumference' [-Wimplicit-function-declaration]
circumference = calculate_circumference(radius);
^
prog.c:24:10: warning: too many arguments for format [-Wformat-extra-args]
printf ("The circumference of the circle is:\n", circumference);
^
/home/j1N8a0/ccUei3id.o: In function `main':
prog.c:(.text.startup+0x45): undefined reference to `calculate_circumference'
collect2: error: ld returned 1 exit status
Любой тип помощи или указал мне в правильном направлении, будет оценен по достоинству!