Thread: Need help. Can't identify error.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Jul 2011
    Posts
    25

    Lightbulb Need help. Can't identify error.

    Beginner here. This is the first program I made. There seems to be an error. Please help me fix it. Thanks.

    Code:
    #include <stdio.h>
    
    int main()
    {
    	int a, b, c, ans1, ans2, ans3, ans4, ans5;
    	printf("Think of three Real numbers... \n\n\n");
    	printf("Enter your first number\n");
    	scanf("%d", &a);
    	printf("Enter your second number\n");
    	scanf("%d", &b);
    	printf("Enter your third number\n");
    	scanf("%d", &c);	
    	ans1 = a*-(b+c);
    	ans2 = (b*b)-4(a*c);
    	ans3 = (a*a)+(b*b*b)+(c*c)-12;
    	ans4 = ((a+b)/(c-b))-(3(b*b))+((4(b))/(3(c)));
    	ans5 = 3(a*a)-2(b*b)-9.14;
    	printf("\nFor equation 1, we have the answer %d,\nFor equation 2, we have %d,\nFor equation 3, we have %d,\nFor equation 4, we have %d and,\nFor equation 5, we have %d, ", ans1, ans2, ans3, ans4, ans5);
    	
    	return 0;
    }
    Last edited by bummielove; 07-04-2011 at 08:58 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. identify my algorithm, please!
    By MK27 in forum Tech Board
    Replies: 8
    Last Post: 11-25-2009, 07:01 AM
  2. How to identify arrow-chars?
    By Zarniwoop in forum C Programming
    Replies: 5
    Last Post: 05-31-2009, 01:07 PM
  3. can you identify this car?
    By axon in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 07-19-2004, 02:59 PM

Tags for this Thread