473,806 Members | 2,879 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

progrm for converting integers to roman numerals using files in clanguage

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 ::::::: ko************* @gmail.com
thank you all
Jan 25 '08 #1
22 3222
ko************* @gmail.com 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
Jan 25 '08 #2
ko************* @gmail.com 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 ::::::: ko************* @gmail.com
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.

Jan 25 '08 #3
ko************* @gmail.com 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 ::::::: ko************* @gmail.com
thank you all
Dork.
Jan 25 '08 #4
ko************* @gmail.com 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 ::::::: ko************* @gmail.com
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_Keit h) <ks***@mib.or g>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Jan 25 '08 #5
Keith Thompson wrote:
ko************* @gmail.com 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 ::::::: ko************* @gmail.com
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.
Jan 25 '08 #6
On Thu, 24 Jan 2008 23:29:58 -0600, ko************* @gmail.com wrote
(in article
<b4************ *************** *******@q77g200 0hsh.googlegrou ps.com>):
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 ::::::: ko************* @gmail.com
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

Jan 25 '08 #7
On 25 Jan, 05:29, kotlakiranku... @gmail.com 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 ::::::: * *kotlakiranku.. .@gmail.com
* 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
Jan 25 '08 #8
ko************* @gmail.com 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 ::::::: ko************* @gmail.com
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)retu rn main(SPAN(HI,LO ),r);
for(puts(*argv) ;--argc;puts(*++ar gv));
return argc;
}

--
Eric Sosman
es*****@ieee-dot-org.invalid
Jan 25 '08 #9

"Eric Sosman" <es*****@ieee-dot-org.invalidwrot e in message
news:XI******** *************** *******@comcast .com...
ko************* @gmail.com 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 ::::::: ko************* @gmail.com

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
Jan 25 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
4616
by: Ivo | last post by:
Hi, An array contains elements of the form , for example IVa, XIXb, LIX and LXIVc. Does anyone have a function which can sort this array in a way a human would expect it to, with the roman letters treated as their numerical values? I don't think this is a especially problematic thing to do, but I don't want to re-invent the wheel. Thanks Ivo
3
2123
by: | last post by:
Hello All, I'm developing a system to parse and enumerate addresses. The current obstacle is numbered streets. Does anybody know of a module already written to convert integers to their english equivalents? Example: 1ST -> FIRST SECOND -> 2ND
13
4395
by: Christopher Benson-Manica | last post by:
Inspired by a thread on clc++, I decided to try it out... #include <stdio.h> #include <stdlib.h> int main( int argc, char *argv ) { int i; int result=0; int this;
4
11769
by: Patrick Blackman | last post by:
How do you write regular numbers eg 1 23 475896 in roman numerals inC#
7
14403
by: daming23 | last post by:
Hi, I'm taking an online C++ class and having some difficulty understanding the assignments. Can someone please look at the code I wrote to ensure validity? I am not asking for the answer just some guidance, I’m totally lost. The assignment is as follow: Write a prg to convert numbers entered in Roman Numeral to decimal. Your prg should consist of a class, say romanType. An object of the type romanType should do the following: a. Store...
3
3311
by: maojecel | last post by:
guyz just want to know the simple code or program how to convert integers to roman numerals.. plz do a reply soon.. i badly need it as soon as u answer. plzzz
2
1964
by: bluedemon | last post by:
I've written the program and it works fine. but my instructor said that i can make the program short and use functions in it, but i cant really understand functions that good. so i just need a little help making the program short and use functions too. I'm posting my code here but i'm not posting the cin statements and the validating user entry loops. i'm just posting the if statements that i used. so here is my code: thousands =...
3
6558
by: mookbooker | last post by:
I have a code written out with zero errors but i know my main() function is completely wrong and after i build the solution i compile it and nothing happens!! Not even cout statements please help. // 2.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> #include <iomanip> #include <cstring>
3
19316
by: capoeira26 | last post by:
I have is that my entered Roman numerals work only if the numerlas are entered in large to smaller format. For exapmple if I type MMC program will correctly display 2100, but when I enter MCM it will display 2100 instead of 1900. I know that I need to come up with a way to determine what letter comes before so program can subtract it but at this point am little stuck. Here is my code: package chapt08; import javax.swing.JOptionPane;
0
9719
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10620
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10110
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9187
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7650
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6877
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5546
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3851
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3008
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.