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

  Describe the chemical symbol of one of the elements

Write a program that reads a single character describing the chemical symbol of one of the elements H, C, N, O, F and prints the full name of the element.

  Design and implement a class called statistician in c++

Design and implement a class called statistician in C++. After a statistician is initialized, it can be given a sequence of double numbers. Each number in the sequence is given to the statistician by activating a member function called next_number..

  Write a function to arrange 10 numbers stored in an arraye

Writ a funtion to arrange 10 numbers stored in an array forom the largest to the smallest and pass the results to main program.

  Write a program that allows two players to play a game

Write a program that allows two players (player X and player O) to play a game of tic-tac-toe. Use a two- dimensional char array with three rows and three columns as the game board. Each element of the array should be initialized with an asterisk ..

  Write file-oriented c program that maintain a list of names

Write an interactive, file-oriented C program that will maintain a list of names, addresses and telephone numbers in alphabetical order (by last names). Process the information associated with each name as a separate record.

  Why is programming is needed now-a-days

Why is programming is needed now-a-days. what is the benefit of colleges to apply heavy loads on students head.

  In c++, write a program that calculates 10,000 tries.

In C++, write a program that calculates 10,000 tries. These tries are based upon a rat trying to escape from a maze. Keep adding minutes until the rat is free and when he is free that is 1 try so we need 10,000. We start by randomly generating a numb..

  Create your own function that accepts one input parameter

Create your own function that accepts one input parameter and returns a float number. You decide the theme. You should provide the pseudocode and an example call. Be sure to provide an overview of what your function is doing.

  Write a function to calculate tax

write a function to calculate tax, the sample output is : Filing Status (1) Single (2) Married (3) Head of Household (0)

  Create a detailed ipo chart

Create a detailed IPO chart that also includes the algorithm from the attached c++ source code.

  Write a program that allows users to enter a dollar amount

Write a program that allows users to enter a dollar amount for their bank account balance at the beginning of the month.

  Implement the tronomino tiling algorithm

Implement the tronomino tiling algorithm,  our program should take an arbitrary input positive integer  k  in the Linux command line and generate a 2 k  * 2 k  board.

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