C program is giving a too many arguments warning

c

Solution

You forgot format string in printf:

printf("Ruutvõrrandi lahendid on: ", solution);

should be:

printf("Ruutvõrrandi lahendid on: %f", solution);
 //                                ^ %f because soulution in float     

Problem

So I have this code where I try to solve some simple math: ``` #include <stdio.h> #include <stdlib.h> #include <math.h> float ruutvorrand(float a, float b, float c); int main(void) { float a; float b; float c; float solution; printf("Ruutvõrrandi lahedamine\nSisesta andmed: "); scanf("%f %f %f", &a, &b, &c); solution = ruutvorrand(a, b, c); printf("Ruutvõrrandi lahendid on: ", solution); return 0; } float ruutvorrand(float a, float b, float c) { float out; float upper; float upper1; upper = sqrt((b * 2)-(4 * a * c)); upper1 = (-b + upper); out = upper1 / (2 * a); return out; } ``` The problem with it is that when I try to compile it I get this error: ``` gcc yl3.c -o ruut -lmyl3.c: In function ‘main’: yl3.c:16:5: warning: too many arguments for format [-Wformat-extra-args] printf("Ruutvõrrandi lahendid on: ", solution); ``` Now what am I doing wrong here. Am I really giving the function too many params?

Original source