When I try to compile I get : "too few arguments for format" - ln 22 whats missing?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • abrown07
    New Member
    • Jan 2010
    • 27

    When I try to compile I get : "too few arguments for format" - ln 22 whats missing?

    Code:
    #include<stdio.h>
    #include<math.h>
    int main(void)
    
    {
    
    	double Yeild, Heads, Seedhead, Size;
    
    
    	
    	printf("Please give the number of heads per square foot: ");
    	scanf("%lf", &Heads);
    	
    	printf("Please input the number of seeds per head: ");
    	scanf("%lf", &Seedhead);
    	
    	printf("Please idicate the seed size: ");
    	scanf("%lf", &Size);
    	
    	Yeild= 726*Heads*(Seedhead/Size);
    	
    	printf("The potential grain yeild: $%.2f\n,Yeild");
    	return 0;
    	
    }
  • johny10151981
    Top Contributor
    • Jan 2010
    • 1059

    #2
    Hi,
    1. You better put your code into code tag. Its simple. just click on the wrap code button in the toolbar and write your code between the tag.

    2. Make your Title/subject more productive.

    3. Add your question in the message not in the title/subject.

    4. You didnt tell what complier version you are using.

    5. You said message, but you didnt said whether it is an error or warning.

    6. all I have noticed in line (I cant suggest the line number. Cause its not in code format)
    Code:
    printf("The potential grain yeild: $%.2f\n,Yeild");
    you better rethink the position of "(double quote) position.

    7. Why did you declared math.h. Cause I dont see any purpose
    Regards,
    Johny

    Comment

    Working...