Hello there!
**I’m looking for help in this task. I’ve got it and it has to be done last week but I’ve tried everything (as I know) but it did not help, so if you can solve it, I’ll be very grateful for it.
This is the task:
In this task, the student shall complete the missing function. There is a half-finished program with a function for the output of information to be created.
An example of formatting printing:
ID: 1300 - Terrace Drive 1555
SalesRep: John Camembert
Promised Intrest Rate: 3.51
Only items that are not sold (object-> sold == 0) are to be printed.
And here is the program:
#include <stdio.h>
#include <stdlib.h>
struct sales
{
int object_id;
char name[64];
char sales_rep[64];
double given_intrest_rate;
uint8_t sold;
};
struct sales houses[] =
{
{1298, “Terrace Drive 1223”, “Gwendolyn Toth”, 3.44, 0},
{1299, “Fourth Road 1223”, “Gwendolyn Toth”, 3.31, 1},
{1300, “Terrace Drive 1555”, “John Camembert”, 3.51, 0},
{1301, “Centric Lane 2388”, “John Camembert”, 3.48, 1},
{1302, “Centric Lane 1998”, “John Camembert”, 3.63, 1},
{1303, “Outroff Road 1116”, “Gwendolyn Toth”, 3.37, 0},
{1305, “Suffork Ranch”, “Steven Crown”, 3.61, 1},
{1306, “Fourth Road 1123”, “Steven Crown”, 3.62, 1},
{1307, “Terrace Drive 1955”, “Steven Crown”, 3.37, 0},
{NULL, NULL, NULL, NULL, NULL}
};
void print_all_objects_not_sold(struct sales* objects)
{
/*
Enter your code here
*/
}
int main()
{
print_all_objects_not_sold(&houses);
return 0;
}
Thanks in advance