programming, in c,

Discussion in 'C Programming' started by vinay, Mar 29, 2006.

  1. vinay

    vinay Guest

    1.)write a function power(a,b), to calculate the value of a raised to

    b.
    2 .)write a general purpose function to convert any given year into
    its roman equivalent.The following table shows the roman equivalents
    of decimal integers.
    Decimal Roman
    1 i
    5 v
    10 x
    50 l
    100 c
    500 d
    1000 m
    example : roman equivalent for 1988 is mdcccclxxxviii
    roman equivalent of 1525 is mdxxv

    jawaab dijiye
     
    vinay, Mar 29, 2006
    #1
    1. Advertising

  2. vinay wrote:
    > 1.)write a function power(a,b), to calculate the value of a raised to b.


    #include <math.h>

    double power(double a, double b)
    {
    return pow(a,b);
    }

    > 2 .)write a general purpose function to convert any given year into


    <snip homework assignment>

    The first one you get for free, as a taster. For the other one, we can
    arrange direct delivery to your teacher, if you provide us with their
    e-mail address, and a cheque for one day's consulting fees, at a rate
    to be negotiated.

    --
    BR, Vladimir
     
    Vladimir S. Oka, Mar 29, 2006
    #2
    1. Advertising

  3. vinay

    alergh Guest

    Hi everybody,
    do you know how can I find a process-ID, and stop it in C!

    Thanks




    Vladimir S. Oka schrieb:

    > vinay wrote:
    > > 1.)write a function power(a,b), to calculate the value of a raised to b.

    >
    > #include <math.h>
    >
    > double power(double a, double b)
    > {
    > return pow(a,b);
    > }
    >
    > > 2 .)write a general purpose function to convert any given year into

    >
    > <snip homework assignment>
    >
    > The first one you get for free, as a taster. For the other one, we can
    > arrange direct delivery to your teacher, if you provide us with their
    > e-mail address, and a cheque for one day's consulting fees, at a rate
    > to be negotiated.
    >
    > --
    > BR, Vladimir
     
    alergh, Mar 29, 2006
    #3
  4. alergh wrote:

    Do not top-post! Do not hijak threads!

    Also, read, and heed:

    <http://cfaj.freeshell.org/google/>
    <http://clc-wiki.net/wiki/Introduction_to_comp.lang.c>

    before posting again.

    > Hi everybody,
    > do you know how can I find a process-ID, and stop it in C!


    Standard ISO/ANSI C knows not of processes. Ask in group discussing
    your particular OS.

    --
    BR, Vladimir
     
    Vladimir S. Oka, Mar 29, 2006
    #4
  5. vinay

    osmium Guest

    "vinay" writes:

    > 2 .)write a general purpose function to convert any given year into
    > its roman equivalent.The following table shows the roman equivalents
    > of decimal integers.
    > Decimal Roman
    > 1 i
    > 5 v
    > 10 x
    > 50 l
    > 100 c
    > 500 d
    > 1000 m
    > example : roman equivalent for 1988 is mdcccclxxxviii
    > roman equivalent of 1525 is mdxxv


    Anyone who converted Roman numbers and came up with that first example
    would be fed to the lions. That is not a proper Roman number, it is your
    instructor's vague notion of what a Roman number is.
     
    osmium, Mar 29, 2006
    #5
  6. vinay

    jaysome Guest

    osmium wrote:

    > "vinay" writes:
    >
    >
    >>2 .)write a general purpose function to convert any given year into
    >>its roman equivalent.The following table shows the roman equivalents
    >>of decimal integers.
    >>Decimal Roman
    >>1 i
    >>5 v
    >>10 x
    >>50 l
    >>100 c
    >>500 d
    >>1000 m
    >>example : roman equivalent for 1988 is mdcccclxxxviii
    >>roman equivalent of 1525 is mdxxv

    >
    >
    > Anyone who converted Roman numbers and came up with that first example
    > would be fed to the lions.


    LOL

    .. That is not a proper Roman number, it is your
    > instructor's vague notion of what a Roman number is.


    Please explain.
     
    jaysome, Mar 30, 2006
    #6
  7. jaysome <> writes:
    > osmium wrote:
    >
    >> "vinay" writes:
    >>
    >>>2 .)write a general purpose function to convert any given year into
    >>>its roman equivalent.The following table shows the roman equivalents
    >>>of decimal integers.
    >>>Decimal Roman
    >>>1 i
    >>>5 v
    >>>10 x
    >>>50 l
    >>>100 c
    >>>500 d
    >>>1000 m
    >>>example : roman equivalent for 1988 is mdcccclxxxviii
    >>>roman equivalent of 1525 is mdxxv

    >> Anyone who converted Roman numbers and came up with that first
    >> example would be fed to the lions.

    >
    > LOL
    >
    > . That is not a proper Roman number, it is your
    >> instructor's vague notion of what a Roman number is.

    >
    > Please explain.


    1988 in Roman numerals is mcmlxxxviii, not mdcccclxxxviii.

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
    We must do something. This is something. Therefore, we must do this.
     
    Keith Thompson, Mar 30, 2006
    #7
  8. vinay

    Richard Bos Guest

    Keith Thompson <> wrote:

    > jaysome <> writes:
    > > osmium wrote:
    > >
    > >> "vinay" writes:
    > >>
    > >>>example : roman equivalent for 1988 is mdcccclxxxviii
    > >>>roman equivalent of 1525 is mdxxv
    > >> Anyone who converted Roman numbers and came up with that first
    > >> example would be fed to the lions.


    > > . That is not a proper Roman number, it is your
    > >> instructor's vague notion of what a Roman number is.

    > >
    > > Please explain.

    >
    > 1988 in Roman numerals is mcmlxxxviii, not mdcccclxxxviii.


    QVOQVE CREDO ROMANI NON IAM HABENT LITTERAE CAROLINGIAE

    VVLGO 1988 LATINE MCMLXXXVIII EST

    Richard
     
    Richard Bos, Mar 30, 2006
    #8
  9. vinay

    Tony Quinn Guest

    In message <VIMWf.508$>, jaysome <>
    writes
    >osmium wrote:
    >
    >> "vinay" writes:
    >>
    >>>2 .)write a general purpose function to convert any given year into
    >>>its roman equivalent.The following table shows the roman equivalents
    >>>of decimal integers.
    >>>Decimal Roman
    >>>1 i
    >>>5 v
    >>>10 x
    >>>50 l
    >>>100 c
    >>>500 d
    >>>1000 m
    >>>example : roman equivalent for 1988 is mdcccclxxxviii
    >>>roman equivalent of 1525 is mdxxv

    >> Anyone who converted Roman numbers and came up with that first
    >>example would be fed to the lions.

    >
    >LOL
    >
    >. That is not a proper Roman number, it is your
    >> instructor's vague notion of what a Roman number is.

    >
    >Please explain.


    1988 is MCMLXXXVIII
    --
    A: Because it messes up the order in which people normally read text.
    Q: Why is it such a bad thing?
    A: Top-posting.
    Q: What is the most annoying thing on usenet and in e-mail?
     
    Tony Quinn, Mar 30, 2006
    #9
  10. In article <>,
    Keith Thompson <> wrote:

    >1988 in Roman numerals is mcmlxxxviii, not mdcccclxxxviii.


    http://mathworld.wolfram.com/RomanNumerals.html

    Furthermore, the practice of placing smaller digits before large
    ones to indicate subtraction of value was hardly ever used by
    Romans and came into popularity in Europe after the invention of
    the printing press (Wells 1986, p. 60; Cajori 1993, p. 31).
    [...]
    It should also be noted that the Romans themselves never wrote M
    for 1000, but instead wrote (I) for 1000, (I)(I) for 2000, etc.,
    and also occasionally wrote IM, IIM, etc. (Menninger 1992, p. 281;
    Cajori 1993, p. 32).
    --
    All is vanity. -- Ecclesiastes
     
    Walter Roberson, Mar 30, 2006
    #10
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. James Lapalme

    Attribute programming

    James Lapalme, Jul 7, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    1,285
    James Lapalme
    Jul 7, 2003
  2. Salisha Khan
    Replies:
    1
    Views:
    11,704
    JohnFol
    Aug 1, 2003
  3. Matt
    Replies:
    35
    Views:
    10,739
    George Neuner
    Jul 22, 2004
  4. Casey Hawthorne
    Replies:
    4
    Views:
    1,056
    Jarek Zgoda
    Aug 4, 2006
  5. Joe Mayo
    Replies:
    168
    Views:
    3,503
    David Thompson
    Oct 22, 2007
Loading...

Share This Page