Thread: error in programs

  1. #1
    Registered User
    Join Date
    Feb 2012
    Location
    India
    Posts
    4

    error in programs

    hi,
    this is my first post in this fourm.
    i am learning "C" just attended 4 classes.
    there is an exercise in the book i have made these program but its not compiling.
    whats wrong in these TWO program?
    Ist on is for the Calculation of Salary ; and the IInd on is for the Conversion of TEMP. F to C
    pl help.


    First

    #include<stdio.h>
    #include<conio.h>
    void main()
    {
    float basic,da,hra,salary;
    printf("\n Enter the Basic Salary :");
    scanf("%f",&basic);
    da=basic*40/100;
    hra=basic*20/100;
    salary=basic+da+hra;
    printf("\n The Basic Salary is :%f",basic);
    prinrf("\n The DA is : %f",da);
    prinrf("\n The HRA is : %f",hra);
    prinrf("\n The Total Salary is : %f",salary);
    getch();
    }


    Second

    #include<stdio.h>
    #include<conio.h>
    void main()
    {
    float f,c;
    printf("\n Enter the TEMP. in F :");
    scanf("%f%f",&f,&c);
    c=5/9.0*(f-32);
    printf("\n The TEMP. in F : %f",f);
    prinrf("\n the TEMP. in C : %f",c);
    getch();
    }
    Attached Images Attached Images error in programs-temp-jpg error in programs-salary-jpg 
    Last edited by mkbutan; 02-11-2012 at 01:34 PM.

  2. #2
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    2,738
    You just have some typos, it's "printf", not "prinrf".
    Devoted my life to programming...

  3. #3
    Registered User
    Join Date
    Feb 2012
    Location
    India
    Posts
    4
    thanks its solved

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 11-09-2009, 07:03 AM
  2. I need help with these 2 programs
    By blacksaibot in forum C++ Programming
    Replies: 4
    Last Post: 03-24-2008, 01:02 AM
  3. 64 bit programs
    By learning in forum C++ Programming
    Replies: 17
    Last Post: 05-10-2007, 11:26 PM
  4. help with programs
    By halloula in forum C++ Programming
    Replies: 15
    Last Post: 04-13-2006, 12:29 AM
  5. Programs opening programs
    By LinuxPLC in forum C Programming
    Replies: 1
    Last Post: 11-21-2002, 12:50 PM