Thread: 10 Quotient

  1. #1
    Registered User
    Join Date
    Nov 2008
    Posts
    1

    10 Quotient

    I am very new to C programming and cannot get a function that will receive one integer as argument, print its last digit and return its 10 Quotient to caller. Can someone please just help me get started

  2. #2
    Registered User
    Join Date
    Sep 2008
    Posts
    58
    A function that will receive one integer as argument...
    Code:
    int number(int n){
      return quotient;
    }
    ]
    That will get you started.

  3. #3
    HelpingYouHelpUsHelpUsAll
    Join Date
    Dec 2007
    Location
    In your nightmares
    Posts
    223
    Define 10 Quotient. Also the last digit is equal to n MOD 10, which is written as:
    Code:
    n % 10
    long time no C; //seige
    You miss 100% of the people you don't C;
    Code:
    if (language != LANG_C && language != LANG_CPP)
        drown(language);

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. reading a file
    By nhubred in forum C++ Programming
    Replies: 3
    Last Post: 05-21-2009, 11:34 AM
  2. A-Star Pathfinding
    By mike_g in forum General AI Programming
    Replies: 1
    Last Post: 08-05-2007, 04:18 PM
  3. temperature sensors
    By danko in forum C Programming
    Replies: 22
    Last Post: 07-10-2007, 07:26 PM
  4. Segmentation Fault
    By Lost__Soul in forum C Programming
    Replies: 46
    Last Post: 04-28-2003, 04:24 AM
  5. Scheduling Algo
    By BigDaddyDrew in forum C++ Programming
    Replies: 41
    Last Post: 03-08-2003, 11:00 AM