Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > progrm for converting integers to roman numerals using files in clanguage

Reply
Thread Tools

progrm for converting integers to roman numerals using files in clanguage

 
 
kotlakirankumar@gmail.com
Guest
Posts: n/a
 
      01-25-2008
please help me out the program for converting the integers to roman
numerals using files in the c language from 1-5000 range send the
program to my
mail id ::::::: http://www.velocityreviews.com/forums/(E-Mail Removed)
thank you all
 
Reply With Quote
 
 
 
 
Richard Heathfield
Guest
Posts: n/a
 
      01-25-2008
(E-Mail Removed) said:

> please help me out the program for converting the integers to roman
> numerals using files in the c language from 1-5000 range send the
> program to my
> mail id


Are you sure you're on the right course? You might find management more to
your liking than programming.

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
 
Reply With Quote
 
 
 
 
santosh
Guest
Posts: n/a
 
      01-25-2008
(E-Mail Removed) wrote:

> please help me out the program for converting the integers to roman
> numerals using files in the c language from 1-5000 range send the
> program to my
> mail id ::::::: (E-Mail Removed)
> thank you all


You are joking right?

No one is going to do your homework for you. Besides shirking at this
stage is going to leave you looking a fool later on. Post some
semblance of an attempt and you might likely get good help.

 
Reply With Quote
 
Sjouke Burry
Guest
Posts: n/a
 
      01-25-2008
(E-Mail Removed) wrote:
> please help me out the program for converting the integers to roman
> numerals using files in the c language from 1-5000 range send the
> program to my
> mail id ::::::: (E-Mail Removed)
> thank you all

Dork.
 
Reply With Quote
 
Keith Thompson
Guest
Posts: n/a
 
      01-25-2008
(E-Mail Removed) writes:
> please help me out the program for converting the integers to roman
> numerals using files in the c language from 1-5000 range send the
> program to my
> mail id ::::::: (E-Mail Removed)
> thank you all


Give us your instructor's e-mail address, and we'll be glad to send
the solution directly to him. For a nominal fee, we'll mention your
name.

--
Keith Thompson (The_Other_Keith) <(E-Mail Removed)>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
 
Reply With Quote
 
Mark Bluemel
Guest
Posts: n/a
 
      01-25-2008
Keith Thompson wrote:
> (E-Mail Removed) writes:
>> please help me out the program for converting the integers to roman
>> numerals using files in the c language from 1-5000 range send the
>> program to my
>> mail id ::::::: (E-Mail Removed)
>> thank you all

>
> Give us your instructor's e-mail address, and we'll be glad to send
> the solution directly to him. For a nominal fee, we'll mention your
> name.
>

For a larger fee we will fake the mail to appear to come from you.
 
Reply With Quote
 
Randy Howard
Guest
Posts: n/a
 
      01-25-2008
On Thu, 24 Jan 2008 23:29:58 -0600, (E-Mail Removed) wrote
(in article
<(E-Mail Removed)>):

> please help me out the program for converting the integers to roman
> numerals using files in the c language from 1-5000 range send the
> program to my
> mail id ::::::: (E-Mail Removed)


As soon as $1000 hits my paypal account I'll send the solution. Have a
nice day.


--
Randy Howard (2reply remove FOOBAR)
"The power of accurate observation is called cynicism by those
who have not got it." - George Bernard Shaw





 
Reply With Quote
 
Nick Keighley
Guest
Posts: n/a
 
      01-25-2008
On 25 Jan, 05:29, (E-Mail Removed) wrote:

> please help me out *the program for converting the integers to roman
> numerals using files in the c language from 1-5000 range send the
> program to my
> *mail id ::::::: * *(E-Mail Removed)
> * thank you all


what does "using files" mean? Can't we dream up a bizzare way of
implementing this? Use file names to store the numbers?

I.dat contains 1
V.dat contains 10
etc.

or
1.dat contains I
5.dat contains V

<pause>

spilt the input into "decades" number 1000's number of 100's
then use the number to generate a filename. Which contains the
answer.

0 -> <empty>
1 -> "I"
2 -> "II"

no probably too silly.

To the OP. Do it on paper first.


--
Nick Keighley
 
Reply With Quote
 
Eric Sosman
Guest
Posts: n/a
 
      01-25-2008
(E-Mail Removed) wrote:
> please help me out the program for converting the integers to roman
> numerals using files in the c language from 1-5000 range send the
> program to my
> mail id ::::::: (E-Mail Removed)


Ask here, get answers here.

#include<stdio.h>
#define LO 1
#define HI 5000
#define SPAN(min,max)(1-((max)-(min)))
static char*r[SPAN(HI,LO)]={"I","II","III",
/* ... fill in remaining values here ... */
"MMMMCMXCVIII","MMMMCMXCIX","?"};
int main(int argc,char**argv){
if(argv!=r)return main(SPAN(HI,LO),r);
for(puts(*argv);--argc;puts(*++argv));
return argc;
}

--
Eric Sosman
(E-Mail Removed)lid
 
Reply With Quote
 
Bart C
Guest
Posts: n/a
 
      01-25-2008

"Eric Sosman" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed). ..
> (E-Mail Removed) wrote:
>> please help me out the program for converting the integers to roman
>> numerals using files in the c language from 1-5000 range send the
>> program to my
>> mail id ::::::: (E-Mail Removed)

>
> Ask here, get answers here.
>
> #include<stdio.h>
> #define LO 1
> #define HI 5000
> #define SPAN(min,max)(1-((max)-(min)))
> static char*r[SPAN(HI,LO)]={"I","II","III",
> /* ... fill in remaining values here ... */
> "MMMMCMXCVIII","MMMMCMXCIX","?"};


Above 1000 you use V, X, L etc with a 'bar' over to scale by 1000.

So not so easy, unless you use a convention like /V.

And the 4000 above looks better as MV-Bar I think. Might be wrong though.

--
Bart


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
C++ And TDD/ C++ programming on Android/ String Calculator Kata inC++/ C++and OpenGL on Android with the NDK/c++ Convert Integers to Roman Numerals sterta bole C++ 0 08-27-2012 09:09 PM
Roman Numerals dragonsfall21@gmail.com Java 10 08-18-2007 10:12 PM
Decimal to Roman Numerals ARMAS C Programming 31 02-06-2007 09:54 AM
[QUIZ] Roman Numerals (#22) Ruby Quiz Ruby 25 03-09-2005 08:44 PM
Roman numerals to ints Christopher Benson-Manica C Programming 13 09-17-2003 03:46 PM



Advertisments