473,386 Members | 1,873 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Currency Conversion

I am trying to convert five currencies and their equivalents to the us dollar

1 Yen = 0.008431
1 Euro = 1.3698
1 Can $ = 0.9437
1 U.K. = 2.0336
1 AU$ = 0.8509
Any help in getting me started is appreciated.
Feb 2 '08 #1
8 3130
sicarie
4,677 Expert Mod 4TB
When you say you are having trouble getting started, what are you having trouble with? Choosing which conversion to make? Showing the possibilities?

You have the ratios there, but have you created the statements to convert them?
Feb 2 '08 #2
I'm sorry
Im suppose to write and name five currencies and their equivalents to the us dollar. The conversons are hard coded equations
insert comments in the program to document the program internally.
Then attach a design flowchart and a version control sheet to a hard copy.

This is the whole problem.
Feb 2 '08 #3
weaknessforcats
9,208 Expert Mod 8TB
Are you able to do the conversion by hand with paper and pencil?
Feb 2 '08 #4
Yes I can do it by hand
Feb 2 '08 #5
JosAH
11,448 Expert 8TB
Yes I can do it by hand
Given the name of a monetary unit how did you find the conversion factor? Remember,
computers are very stupid, you have to tell them everything explicitly.

kind regards,

Jos
Feb 2 '08 #6
#include <stdio.h>

main ()

{
printf("\nCurrency Conversion\n"\n1 US Dollars = 0.008431 Yen
\n1 US Dollars = 1.3698 Euro \n"\n1 US Dollars = 0.9437 Can \n"
\n1 US Dollars = 2.0336 U.K \n"\n1 US Dollars = 0.8509 AU \n");
return 0;
}

Here is what I came up with converting currency. When i tried to compile it i get a Error msg on line 4. Could some one help me, being some one who is new to programing i am haveing a hard time figure this out.
Feb 2 '08 #7
Laharl
849 Expert 512MB
printf() takes one string argument, so you have to use just one set of quotes to surround all of that. If you want to actually print the " character, you use \". If you don't need that character, don't use any " in the middle of the format string.

Expand|Select|Wrap|Line Numbers
  1. printf("\nCurrency Conversion\n1 US Dollars = 0.008431 Yen
  2. \n1 US Dollars = 1.3698 Euro \n\n1 US Dollars = 0.9437 Can \n
  3. \n1 US Dollars = 2.0336 U.K \n\n1 US Dollars = 0.8509 AU \n");
  4.  
Feb 2 '08 #8
printf() takes one string argument, so you have to use just one set of quotes to surround all of that. If you want to actually print the " character, you use \". If you don't need that character, don't use any " in the middle of the format string.

Expand|Select|Wrap|Line Numbers
  1. printf("\nCurrency Conversion\n1 US Dollars = 0.008431 Yen
  2. \n1 US Dollars = 1.3698 Euro \n\n1 US Dollars = 0.9437 Can \n
  3. \n1 US Dollars = 2.0336 U.K \n\n1 US Dollars = 0.8509 AU \n");
  4.  
Thanks I think that i am starting to understand how to do this . Your help is greatly appricated.
Feb 2 '08 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Willing 2 Learn | last post by:
I'm still having trouble getting my program to do arithmetic in cents(keeping all #'s) then convert the answer in a format of dollars & cents. The main program should add, subtract, scalar...
0
by: Willing 2 Learn | last post by:
I'm still having trouble getting my program to do arithmetic in cents(keeping all #'s) then convert the answer in a format of dollars & cents. The main program should add, subtract, scalar...
10
by: jayender.vs | last post by:
Hello guys, I need to know the Currency conversion code in Javascript Say for example i got 2 textbox .. where i enter a number (singapore doller value) and i provide a button and in the next text...
16
by: xjohnx | last post by:
Hi, I'm hoping someone can help me I am quite new to Javascript and have had to create a programme which converts dollars into euros and vice versa, here is my script which is working var...
25
by: mereba | last post by:
Hello My country Ghana is changing its currency. I want to write a small programme in C++ that can covert from the old currency into the new one. I would like this programme to run behind a simple...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.