2. Assume that a program is to be written for a computer supply store and that t
ID: 3555341 • Letter: 2
Question
2. Assume that a program is to be written for a computer supply store and that the following information must be maintained:
Assume that at any given time there are at most 100 different parts in inventory. Write just the lines of code to declare all of the variables that would be required for this application. Write the required const and typedef's first and then use them to declare the variables.
4. Assume that information is to be maintained on income of employees for a company as follows:
Assume that at any given time there are at most 40 employees. Write just the lines of code to declare all of the variables that would be required for this application. Write the required const and typedef's first and then use them to declare the variables.
description unit price quantity weight printer 122.50 8 212.00 cpu 1000.00 40 15.00 monitor 135.00 40 106.00Explanation / Answer
2/
#include<iostream>
#define SIZE 100;
#define MAX 40
typedef char c;
typedef float f;
typedef int i;
using namespace std;
int main()
{
c disc [MAX][SIZE];
f unit[SIZE];
i quant[SIZE];
f weight [size];
}
4/
#include<iostream>
#define SIZE 40;
typedef int i;
using namespace std;
int main()
{
i E_id[SIZE];
i base[SIZE];
i Com[SIZE];
i Tot[SIZE];
i Uni[SIZE];
}
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.