
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main()
{
int *arr;
int x, y, i, j, sum = 0, min = 0, minstr = 0;
srand(time(NULL));
x = 2 + rand() % 10;
y = 2 + rand() % 6;
arr = (int*)malloc(x*y*sizeof(int));
printf("Array %d x %d: \n", x, y);
for (i = 0; i < x; i++){
for (j = 0; j < y; j++){
*(arr + i*y + j) = -50 + rand() % 100;
printf("arr[%d][%d] = %3d; ", i, j, *(arr + i*y + j));
}
printf("\n");
}
for (i = 0; i < y; i++)
min += *(arr + i);
minstr = 0;
for (i = 1; i < x; i++){
for (j = 0; j < y; j++)
sum += *(arr + i*y + j);
if (sum < min) {
min = sum;
minstr = i+1;
}
sum = 0;
}
printf("Minimum amount: %d (%d line)", min, minstr);
free(arr);
return 0;
Объяснение:
это пример как делать
Объяснение:
No or not?
Grammar > Easily confused words > No or not?
из English Grammar Today
No and not are the two most common words we use to indicate negation. We use no before a noun phrase:
There’s no address on the envelope.
[parent to child]
No biscuits before dinner!
No decisions have been made.
We use not with any other phrase or clause:
It’s not often that you stop and think about the way you breathe.
Not suitable for children under 15.
Not surprisingly, it was a tense match but eventually the more experienced Australians won.
A:
Do you go cycling all year round?
B:
Not in the winter.