First Upload

This commit is contained in:
2022-02-25 15:33:16 +02:00
commit 0c74d10f0d
295 changed files with 74784 additions and 0 deletions

26
1/ex4.c Normal file
View File

@@ -0,0 +1,26 @@
#define APPLE_COUNT 10
#define APPLE_COST 5
#define TWO 2
//---------------------------------------------------------------------------------------
// Exercise 4
// ----------
//
// General : The program calculates what is the cost for bananas and apples.
//
// Input : None.
//
// Process : The program calculate price by multiply and amount.
//
// Output : None.
//
//---------------------------------------------------------------------------------------
// Programmer : Cohen Idan
// Student No : None
// Date : 09.09.2019
//---------------------------------------------------------------------------------------
void main(void)
{
unsigned char bananas = APPLE_COUNT + TWO;
unsigned short sum_cost = (APPLE_COUNT * APPLE_COST) +
(bananas * APPLE_COST * TWO);
}