-
Notifications
You must be signed in to change notification settings - Fork 0
/
grocerystore2.c
27 lines (22 loc) · 885 Bytes
/
grocerystore2.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <stdio.h>
int main()
{
int appleQuantity;
double applePrice = 1.49;
double appleReview;
int appleReviewDisplay;
const char appleLocation = 'F';
int dayOfWeek = 0;
dayOfWeek += 3;
appleQuantity = 23;
appleReview = 82.5;
appleReviewDisplay = appleReview;
if (appleQuantity < 10 || (dayOfWeek % 7) == 3)
{
printf("Sale on apples today, today only they are: $%.2f\n", applePrice * .9);
}
appleReview = (823 + 52) / 10;
appleReviewDisplay = appleReview;
// Put all your code above this and if you declare your variables using the given names and types there is no need to change any of the code below.
printf("An apple costs: $%.2f, there are %d in inventory found in section: %c and your customers gave it an average review of %d%%!", applePrice, appleQuantity, appleLocation, appleReviewDisplay);
}