What are data declaration statements

Assignment Help C/C++ Programming
Reference no: EM13939579

I need an example of a flow chart and specification sheet of a C program.

Here is an example of a C program:

/*Currency conversion.*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <system.h>
main ()
{
/* Data Declaration statements*/

int Curr_type;
float For_curr;
float Equ_curr;

printf("CURRENCY CONVERTERn");
printf("Choose currency optionn");
printf("Press 1 for MXN: Mexican Peson");
printf("Press 2 for JPY: Japanese Yenn");
printf("Press 3 for HKD: Hong Kong Dollarsn");
printf("Press 4 for KRW: Korean Wonn");
printf("Press 5 for PHP: Philippine Peson");
printf("Enter the type of currency:");
scanf("%d", &Curr_type);/* & symbol assigns L-H and R-H to the left hand quantity*/
printf("Enter the amount of money that you would like to convert to USD:");
scanf("%f", &For_curr);

/* Switch statement to Case Curr_type (1, 2, 3, 4, 5)*/
switch(Curr_type)
{

/* MXN: Mexican Peso */
case 1:
Equ_curr = ((For_curr) * (0.08764));
printf ("The equivalent of %.2f MXN is %.2f USD n", For_curr, Equ_curr);
break; /* Jump to end of switch*/

/* JPY: Japanese Yen */
case 2:
Equ_curr = ((For_curr) * (0.009093));
printf ("The equivalent of %.2f JPY is %.2f USD n", For_curr, Equ_curr);
break; /* Jump to end of switch*/

/* HKD: Hong Kong Dollars */
case 3:
Equ_curr = ((For_curr) * (0.1283));
printf ("The equivalent of %.2f HKD is %.2f USD n", For_curr, Equ_curr);
break; /* Jump to end of switch*/

/* KRW: Korean Won */
case 4:
Equ_curr = ((For_curr) * (0.0008591));
printf ("The equivalent of %.2f KRW is %.2f USD n", For_curr, Equ_curr);
break; /* Jump to end of switch*/

/* PHP: Philippine Peso */
case 5:
Equ_curr = ((For_curr) * (0.01791));
printf ("The equivalent of %.2f PHP is %.2f USD n", For_curr, Equ_curr);
break; /* Jump to end of switch*/

} /*end switch */
getch ();
return (0);
}

Reference no: EM13939579

Questions Cloud

Calculate the following integer quantaties : For example, July 31, 1929 gives a = 5, b = 31, c = 29, d = 19; January 3, 1988 gives a = 11, b = 3, c = 87, d = 19. Noe calculate the following integer quantaties
Survey of entertainment technology : Use the internet to research the people who operate a radio station (the radio station management and staff - there are roughly a dozen key positions).
Expect the rate of return to be for the investor : We have a callable 25 year, 2% bond X and associates selling at $1500. If the instrument is callable after 4 years at $1050, what will the yield to call and the yield to maturity be? What do we expect the rate of return to be for the investor of X?
Letter to deliver to the homes and apartments : You have decided to write a promotional sales letter to deliver to the homes and apartments in the area. Your letter should be attractive and include details that you think is necessary to boost business and attract more customers.
What are data declaration statements : I need an example of a flow chart and specification sheet of a C program.
Discuss and critically analyse court or tribunal decision : Outline the Trade Practices Act / Australian Competition and Consumer Act have been breached and explain why they were breached and Discuss and critically ANALYSE the court/tribunal decision and the reason for the decision
Explain why mutations of the framework region of an antibody : Give one reason why this might be important for the efficacy of the antibody response. Explain why mutations of the framework region of an antibody might be more detrimental to the antibody than mutations in CDR's
Compare dry heat and moist heat methods of microbial control : Describe each of the following in terms of its chemical nature, mechanism of action, mode of application, common uses and effectiveness, and advantages and disadvantages: heavy metals, phenolics, halogens
Which pieces of information can be found in the ip header : There are eight network security questions. I have answered the questions however, I am unclear if I am correct. Please review and if I am wrong, please provide the correct answer along with your explanation.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd