programming, in c,

V

vinay

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
 
V

Vladimir S. Oka

vinay said:
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.
 
O

osmium

vinay said:
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.
 
J

jaysome

osmium said:
:




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.
 
R

Richard Bos

Keith Thompson said:
1988 in Roman numerals is mcmlxxxviii, not mdcccclxxxviii.

QVOQVE CREDO ROMANI NON IAM HABENT LITTERAE CAROLINGIAE

VVLGO 1988 LATINE MCMLXXXVIII EST

Richard
 
T

Tony Quinn

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.[/QUOTE]

1988 is MCMLXXXVIII
 
W

Walter Roberson

Keith Thompson said:
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).
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,176
Messages
2,570,947
Members
47,501
Latest member
Ledmyplace

Latest Threads

Top