two easy assignment on C program ( #10, #11 )

timer Asked: Jan 1st, 2018
account_balance_wallet $15

Question description

please see the attachment in order to know what are the requirements. you should work on the C program, all what you have to do is to type the requirements in the C program , they are really easy

ECE 102 Assignment #12 Julian day number revisited The Julian day number (JDN) is the number of days since January 1, 4713 BC. For example, January 1, 2000 corresponds to JDN = 2451558. See for more information. The JDN can be calculation using the following formula given the day, month and year: where  number  is the function floor in C, which is the integer part of a number. The integer division in C will take care of this truncation automatically. Write a C program that will prompt a user for day, month, and year (as integers). Then the program computes and prints 1) the JDN of the date. 2) The day number of the year. For example, Jan. 12, 2017 is day 12 of 2017, and Feb 20, 2017 is day 52 of 2017. The output should be similar to the following example, where the month is displayed in words February 20, 2017 is JDN ________ and it is day 52 of 2017. Pre-lab assignment 1. Write down all the constraints for this program. Leap Year Rules: (Hint: use % to check divisible by something) There is a leap year every year whose number is perfectly divisible by four except for years which are both divisible by 100 and not divisible by 400. 2. Write down a detailed pseudocode for the error-checking. 3. Write down a detailed pseudocode for the display. Hint: you need to use an if-else if statement. Review the notes on slide 44 in Notes_3_C_1. Programming requirements: 1. Pointers and vectors are not allowed in this assignment. 2. Add error-checking to your Assignment#7 code. Note there is no need to modify the calculation except that the formula should be updated as shown in this handout. 3. Change the display to using word for the month. 4. Your program should match the pseudocode.
GENG 102 Assignment #13 Simulate a vending machine Write a program that simulate the response of a vending machine with keypad. One input is a letter of either W or P. The second input is a digit between 0 and 3. The response is a message that appears on the screen. When two keys are pressed, the message will appear as shown in the right column below. W0 smart water W1 vitamin water W2 propel W3 water P0 sprite P1 diet sprite P2 or P3 mountain dew Prelab: 1. Write down the first two steps of problem solving. There should be two inputs, one to hold the letter and the other for the digit. 2. There is no calculation needed in this program. The formula is needed for the output display. Write the formula in the following format:  if inputs  W0  Output display =  smart water  if inputs  W1   vitamin water   ... ...   mountain dew if inputs  P2 or P3 3. Write down the pseudo code.

Tutor Answer

School: Duke University


flag Report DMCA

Thanks, good work

Similar Questions
Hot Questions
Related Tags

Brown University

1271 Tutors

California Institute of Technology

2131 Tutors

Carnegie Mellon University

982 Tutors

Columbia University

1256 Tutors

Dartmouth University

2113 Tutors

Emory University

2279 Tutors

Harvard University

599 Tutors

Massachusetts Institute of Technology

2319 Tutors

New York University

1645 Tutors

Notre Dam University

1911 Tutors

Oklahoma University

2122 Tutors

Pennsylvania State University

932 Tutors

Princeton University

1211 Tutors

Stanford University

983 Tutors

University of California

1282 Tutors

Oxford University

123 Tutors

Yale University

2325 Tutors