Final exam prep - 2024 FA [1] Intro Comput & Prog CSCI 271 05 [35615] [Lecture] [John Jay College]
.p
School
Cristo Rey High School**We aren't endorsed by this school
Course
SCIENCE 271
Subject
Information Systems
Date
Dec 18, 2024
Pages
1
Uploaded by BrigadierSteel10674
Write a function that returns the number of odd numbers between two numbers input by the user. Write a function that returns the sum of all multiples of 4 between and including two numbers entered by the user. Write a function that returns the discount amount depending on the number of coffees purchased. If more than 20 coffees are purchased, the discount is 30%, if more than 15 and less than 20 coffees are purchased, the discount is 25%, if more than 10 and less than 15 coffees are purchased, the discount is 15%, if more than 5 and less than 10 coffees are purchased, the discountis 10%. Write a program uses an array of type int to hold the number of cake orders over a week. For each of the 7 days, get input of the number of cake orders. After the input is complete, find and print the total number of cakes ordered for the week. Write a program that uses an array of type double to store wholesale purchase invoice amounts. After all the invoice amounts are input, find and print the invoice amounts over 5000. Write a program that uses an array of type double to store the temperatures for a year (365 days). After all the temperatures are entered for the year, find and print the highest temperature recorded during the year. Given two integer variables: 'num1=7'and 'num2 = 15', write a C++ program that uses pointers P1 and P2 to access these variables. Your program should output the memory addresses and the values of 'num1' and 'num2' using these pointers. Format your output as follows: Address of num1: [memory address] Value of numf: [value] Address of num2: [memory address] Value of numa2: [value] Ensure your program correctly demonstrates the use of pointers to access memory addresses and variable values