plss give me a program peso and dollar conversion my program is 2errors plss give me the code program im noob programmer im comsci student plss help
plss give me a program peso and dollar conversion my program is 2errors plss give me the code program im noob programmer im comsci student plss help
I will give you a simple command prompt program for the same. You have to do the actual coding but I will break it to you firstly. You should be able to figure this out from here. I do not give actual code so you can do it yourself and learn while doing it.
Main function:
start loop for main menu
-----print "Enter 1 to convert dollars to pesos, enter 2 to convert pesos to dollars, and enter 3 to exit"
----get user input
----analyze user input with the following (a switch statement would be best. I will let you figure out how to do that):
-------- If 1, call a function that convert dollars to pesos and returns a double. A statement using that result.
-------- If 2, call a function to convert pesos to dollars that returns the result as a double. print a statement displaying the results.
-------- If 3, use a return statement to end the program.
-------- if user input is not one of these, print error
go back to beginning of loop
dollars to pesos function:
----ask user to input the number of dollars. (read it as a double)
----use an equation to convert the dollars to pesos using the exchange rate. It should be something simple like pesos = dollars * dollarsToPesosExchangeRate.
----return the result.
pesos to dollars function:
---- ask the user to input the number of pesos and get the user input.
---- use an exchange rate to convert it. It should use a similar method to above, but a different exchange rate.
---- return the value as a double.
Turbo C has a good collection of graphics libraries. If you know the basics of C, you can easily learn graphics programming.
Bookmarks