Thread: Undefined Prefrence 'printf' Help???

  1. #1
    Registered User
    Join Date
    Dec 2017
    Posts
    7

    Angry Undefined Prefrence 'printf' Help???

    Code:
    #include <stdio.h>
    #include <conio.h>
    
    
    main()
    {
        int s1,s2,t;
        float avg;
        
        printf(" name = suleman khan");
        printf(" \nclass = bs (it)");
        Printf(" \nmarks = 180");
        scanf("%d",&s1);
        t = (s1 + s2);
        avg   = (s1 + s2)/2;
        
        if("avg<50)::&&::(s2>50")
        {
            printf("\nfail");
        }
        
        else
        if("avg=50)::&&::(avg<60")
        {
            printf("\n grade=c");
        }
        
        if("(avg>=60)::&&::(avg<70")
        {printf("\n grade=b");
        }
        
        if("avg>=70)::&&::(avg<=100")
        {
            printf("grade=a");
        }
        
        else
        print("\n better luck next time");
        
        return 0;
    }
    ERROR
    Undefined Prefrence 'printf' Help???-untitled-jpg

  2. #2
    Registered User
    Join Date
    Dec 2017
    Posts
    7
    PlZZZZZ Help
    It's A Mark Sheet

  3. #3
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    2,738
    In C, the case of a letter matters. 'A' isn't the same as 'a'. Likewise, printf isn't the same as Printf.

    Also, you're putting your if statements inside quotes, can't you see by the coloring that something is wrong?
    Devoted my life to programming...

  4. #4
    Registered User
    Join Date
    Dec 2017
    Posts
    7
    Can Any Body Help?

  5. #5
    Registered User
    Join Date
    Dec 2017
    Posts
    7
    I Know But I Can't Understand
    I Am New In C Plzzz Solve The Issues And Send it Back

  6. #6
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    2,738
    It's okay if you fail the exam, maybe next time you'll be more prepared for it.
    Devoted my life to programming...

  7. #7
    Registered User
    Join Date
    Dec 2017
    Posts
    7
    No Bro I got it
    Thanks

  8. #8
    Banned
    Join Date
    Aug 2017
    Posts
    861
    I guess process of elimination is not taught in programing class in college where people pay a large amount of money to have someone show them a few things on programming then they toss them out to the wolves to try and figure out the rest.
    Last edited by userxbw; 12-10-2017 at 02:29 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Undefined reference to 'printf'
    By Marco Angelo in forum C++ Programming
    Replies: 1
    Last Post: 03-15-2016, 06:11 PM
  2. a[i]= i++ is undefined while i=i+1 is not
    By Abhishek Kumar in forum C++ Programming
    Replies: 11
    Last Post: 02-28-2014, 05:18 PM
  3. Undefined reference to 'Printf' ????
    By mwoelfel in forum C Programming
    Replies: 5
    Last Post: 04-27-2012, 01:42 PM
  4. make printf using printf?
    By germaneater in forum C Programming
    Replies: 9
    Last Post: 11-10-2004, 10:58 PM
  5. undefined What!!
    By breed in forum C Programming
    Replies: 6
    Last Post: 01-22-2002, 05:25 PM

Tags for this Thread