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

  How do you make a row with different string names

How do you make a row with different string names and put a certain amount of space between each one?

  Define the term root-to-leaf path in detail

My goal, given a binary tree and a sum, is to return true if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum. Returning false if no such path can be found.

  Write a program in c that will find smallest value

Write a programe c that will find the smallest, largest and average values in a collection of N numbers.Get the value of N before scanning each value in the collection of N numbers.

  How many students he wants to add to each course

I need a program that will ask the user how many courses he wants to input and how many students he wants to add to each course and the name of each student.

  From the worker''s gross pay

An employee is paid at a rate of $16.78 per hour for the first 40 hours worked in a week. Any hours over the regular 40 hours are paid at the overtime rate of one-and-one-half times that. From the worker's gross pay

  Write a c program that displays a table showing the price

write a c program that displays a table showing the price of silver and gold. the table will have three columns. the

  Show that the worst-case running time of quick

Show that the worst-case running time of quick-select on an n-element sequence is ?(n2) - I'm not sure how to solve the question. Can anyone help me?

  Design and implement a library system that does the

design and implement a library system that does the following ? takes details of a studentlibrary users first name last

  Define a class called plot that has private members of lengt

Define a class called Plot that has private members of length and width. Include a constructor and a public function that calculates the area and the length of the boundary of the field.

  Calculate the cube of a number

Write a program that will calculate the cube of a number. Do this by writing a user defined function that returns the cube of the value passed to it. Print out the results from main.

  Improvemented program

What does this program do and would you improve it?

  Prepare a program to find the area of a triangle

Write a program that prompts the user to enter three point (x1, y1), (x2, y2), (x3, y3) of a triangle and display its area.

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