Thread: write a program to computer>>

  1. #1
    Registered User
    Join Date
    Mar 2009
    Posts
    5

    Unhappy write a program to computer>>

    hay
    how are you?

    i want help for write this program to computer


    use c program

    the basic salary is given as input use the given data and find the output in the following format.



    given data:

    da=10%of basic
    har=12%of basic
    ca=2%of basic
    it=3%of (basic+da)
    gpf=2%of (da+har+ca)
    gross=basic+da+hra
    net_deductions=it+gpf
    net_salary=gross-net_deduction




    output format:


    basic salary is RO______

    dearness allowance is RO______ income tax is RO_______

    house rent allowance RO______ general provident fund RO_____
    ___________________________ _____________________________

    gross salary RO______ net salary RO_____




    please help me>>>


    *_*

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    The rules of this forum is that you post your best effort, and we help you, not that you post your assignment and we do the work.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Registered User
    Join Date
    Mar 2009
    Posts
    5
    ok my dear

    but you know i’m now with c program


    and i want how help me :



    ok but u can tall me who can answer is program and i will do it



    if cant


    no problem


    i will tray alone

  4. #4
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    And ME doing it for you will achieve what, exactly? Will you magically be able to program in C if I do this task? Or will it simply make you pass a mark in school without effort of your own?

    Sorry, but the forum RULES are that we do not DO other peoples assignments.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  5. #5
    Registered User
    Join Date
    Mar 2009
    Posts
    5
    ok my dear

    give me steps for do this program



    i am sorry for to tall u about my problem


    ok but i am sure this forum is so so good to help who really need helps

  6. #6
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Post what you have done so far... It's no point in me writing down steps that you have already done, and I will also get a feel for how much you know from your post.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  7. #7
    Registered User
    Join Date
    Mar 2009
    Posts
    5
    look to my work

    Code:
    #include<stdio.h>
    #include<conio.h>
    
    void main()
    {
    
    float  da,har,ca,gpf,it,gross,net_deductions,net_salary,basic;
    printf("enter numbers");
    scanf("%f",basic);
    >>>
    
    getch();
    }

  8. #8
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    So, aside from missing the & on basic for scanf, it looks good. How about you print the value you input next, just to check that it works right.

    Then you need to perform your calculations of the different percentages and print the results of those calculatioins.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  9. #9
    Registered User
    Join Date
    Mar 2009
    Posts
    5
    what about this ????

    Code:
    #include<stdio.h>
    #include<conio.h>
    
    void main()
    {
    
    float  da,har,ca,gpf,it,gross,net_deductions,net_salary,basic;
    printf("basic");
    printf("basic salary is OR%f",basic)
    
    da=0.1*basic;
    printf("dearness allowance is RO%f",da);
    getch();
    }

  10. #10
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Well, you probably want to INPUT the basic value using scanf like you started out with before printing it, don't you think?

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  11. #11
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,793
    main should be

    int main(void) - read FAQ
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    David J. Wheeler

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Newbie needs help..
    By xpress urself in forum C++ Programming
    Replies: 3
    Last Post: 07-26-2007, 07:22 PM
  2. how could i write this program: cat < apa | wc | wc > bepa
    By strugglingman in forum C Programming
    Replies: 2
    Last Post: 04-26-2006, 04:40 PM
  3. Is there another way to write this program?
    By agentxx04 in forum C Programming
    Replies: 1
    Last Post: 11-23-2004, 09:28 PM
  4. Replies: 1
    Last Post: 10-13-2004, 12:15 PM
  5. Challenge to write a program
    By Twisted.alice in forum A Brief History of Cprogramming.com
    Replies: 40
    Last Post: 05-15-2003, 12:00 PM