Answer:
To do this you'll need to use malloc to assign memory to the pointers used. You'll also need to use free to unassign that memory at the end of the program using the free. Both of these are in stdlib.h.
#include <stdlib.h>
#include <stdio.h>
#define SIZE_X 3
#define SIZE_Y 4
int main(void){
int **matrix, i, j;
// allocate the memory
matrix = (int**)malloc(SIZE_X * sizeof(int*));
for(i = 0; i < SIZE_X; i++){
matrix[i] = (int *)malloc(SIZE_Y * sizeof(int));
}
// assign the values
for(i = 0; i < SIZE_X; i++){
for(j = 0; j < SIZE_Y; j++){
matrix[i][j] = SIZE_Y * i + j + 1;
}
}
// print it out
for(i = 0; i < SIZE_X; i++){
for(j = 0; j < SIZE_X; j++){
printf("%d, %d: %d\n", i, j, matrix[i][j]);
}
}
// free the memory
for(i = 0; i < SIZE_X; i++){
free(matrix[i]);
}
free(matrix);
return 0;
}
Answer:
Explanation:
public void rotate()
{
if(front == null)
return;
ListNode current = front;
ListNode firstNode = current;
while(current.next != null)
{
current = current.next;
}
current.next = front;
front = firstNode.next;
firstNode.next = null;
}
Answer:
- Divide the resources into three parts using the corresponding process 1, process 1, and process 2 formats to maximize the use of the resources.
- Get the expected revenue by calculating the product of the total perfume in ounce and the price of an ounce of perfume.
- Increase the advertisement hours of the product.
- subtract the advert fee from the generated revenue to get the actual revenue.
- subtract the cost of production from the actual revenue to get the actual profit.
Explanation:
The get maximum profit, all the resources must be exhausted in production. The labor is divided into a ratio of 1:1:2 ( which is 5000, 5000, 1000), while the chemical units are in the ratio of 2:2:3 (10000,10000,15000). This would produce in each individual processes; 15000, 15000 and 25000 oz, which is a total of 55000 oz of perfume.
The expected revenue is $275000. If 1000oz from the 55000oz of perfume is sold without advertisement, model Jenny's awareness of the perfume increases the demand by 200oz per hour, therefore, 24hours would field 4800oz demanded, which would only take 270 hours to distribute all remaining perfumes.
The cost of production would be $130000 for labor and chemical resources plus the advert cost of $27000 ( 270 hours by 100) which is a total cost of $157000. The actual profit is $118000 ( $275000 - $157000).
Answer:
The highest numeral in binary code is 1
In binary, you can only have 1s and 0s
if you're asking for the biggest number that can be represented, it's 255, which is 11111111. (this is 8 1s)
Explanation:
Is this a trick question? lol
May I have brainliest please? :)
From what i learned from school, have a theme for the presentation and only have 1-3 pictures per slide that aren’t too big but small enough so you can read and see, also pictures that are self explanatory