Thread: progrmming in C

  1. #1
    Registered User
    Join Date
    Jul 2009
    Posts
    10

    Question progrmming in C

    i need ur help...wut should i do in my progrmmin methods for dis kind of questions

    Rahim's gross salary is input through the keyboard. his EPF (employee provident fund) is calculated at 11% of his gross salary, and his SOCSO is calculated at 8% of his gross salary. right a program to calculate his net salary (take home salary). EPF and SOCSO should be subtracted/deducted from gross salary to calculated net salary.

  2. #2
    C++11 User Tux0r's Avatar
    Join Date
    Nov 2008
    Location
    Sweden
    Posts
    135
    Quote Originally Posted by zeetaQ53 View Post
    i need ur help...wut should i do in my progrmmin methods for dis kind of questions

    Rahim's gross salary is input through the keyboard. his EPF (employee provident fund) is calculated at 11% of his gross salary, and his SOCSO is calculated at 8% of his gross salary. right a program to calculate his net salary (take home salary). EPF and SOCSO should be subtracted/deducted from gross salary to calculated net salary.
    right, so right it

  3. #3
    Registered User
    Join Date
    Jul 2009
    Posts
    10
    Quote Originally Posted by zeetaQ53 View Post
    i need ur help...wut should i do in my progrmmin methods for dis kind of questions

    Rahim's gross salary is input through the keyboard. his EPF (employee provident fund) is calculated at 11% of his gross salary, and his SOCSO is calculated at 8% of his gross salary. right a program to calculate his net salary (take home salary). EPF and SOCSO should be subtracted/deducted from gross salary to calculated net salary.
    huarghhhh

  4. #4
    Registered User
    Join Date
    Jul 2009
    Posts
    10
    i dun no how to do it :P

  5. #5

  6. #6
    Registered User
    Join Date
    Jul 2009
    Posts
    10
    im still new learning progrmmin

  7. #7
    C++11 User Tux0r's Avatar
    Join Date
    Nov 2008
    Location
    Sweden
    Posts
    135
    Quote Originally Posted by zeetaQ53 View Post
    im still new learning progrmmin
    Oh!

    ...


    Well read up on that tutorial and go from there.

  8. #8
    Webhead Spidey's Avatar
    Join Date
    Jul 2009
    Posts
    285
    im still new learning progrmmin
    Yes, that is why Tux0r told you to read this -

    Cprogramming.com Tutorial: Introduction to C

    After that, think about the problem and ways to approach it. What all do you think you need to do to solve it ? Write some pseudo-code on paper, Start with simple user input, after that tackle the more advanced stuff.

  9. #9
    Registered User
    Join Date
    Jul 2009
    Posts
    10

    Question how bout dis?m i correct or wrong?n wut would it present?

    Code:
    
    
    main()
    {
    int c1, c2, c3, c4, c5, code;
    char A, B, C, D, E;
    printf ("Enter codes in 5 countries: ");
    scanf ("%d %d %d %d %d", &c1, &c2, &c3, &c4, &c5);
    if (A)
    printf ("code=Argentina");
    else if (B)
    printf ("code=Brazil");
    else if (C)
    printf ("code=Canada");
    else if (D)
    printf ("code=Denmark");
    else (E)
    printf ("code=England");
    }
    Last edited by zeetaQ53; 07-21-2009 at 03:17 AM.

  10. #10
    Webhead Spidey's Avatar
    Join Date
    Jul 2009
    Posts
    285
    how bout dis?m i correct or wrong?n wut would it present?
    Do you have a compiler ?

  11. #11
    Registered User
    Join Date
    Jul 2009
    Posts
    10
    no...i dun hav...

  12. #12
    Webhead Spidey's Avatar
    Join Date
    Jul 2009
    Posts
    285
    no...i dun hav..
    In that case, I recommend you read this first -

    Cprogramming.com: How to Get Started with C++

    You cant start programming without even knowing what it is. Also, it would help if you bought a c book so that you know what your doing.

    Heres the compiler I use, try installing it once you think you are ready -

    http://www.microsoft.com/express/vc/

  13. #13
    C++11 User Tux0r's Avatar
    Join Date
    Nov 2008
    Location
    Sweden
    Posts
    135
    Quote Originally Posted by zeetaQ53 View Post
    no...i dun hav...
    Then get Visual C++ 2008 Express Edition or Fortran, C, C++ for Windows (probably not)

  14. #14
    Registered User
    Join Date
    Jul 2009
    Posts
    10
    squirrels?

  15. #15
    Registered User
    Join Date
    Jul 2009
    Posts
    10
    mr.spidey...hehe da compiler dat u recommend ...is it free?

Popular pages Recent additions subscribe to a feed